question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Q] Problem with "Implicit intersection operator: @"

See original GitHub issue

I’m creating a simple sheet which includes an Excel array formula: SUM( ROUND( D1:D3, 0 )) With this code (ExcelJS 4.1.1):

     const workbook = new Excel.Workbook();
     const worksheet = workbook.addWorksheet( 'test_sheet' );
     worksheet.getCell( 'D1:D1' ).value = 1.2;
     worksheet.getCell( 'D2:D2' ).value = 2.3;
     worksheet.getCell( 'D3:D3' ).value = 5.6;
     worksheet.getCell( 'D4:D4' ).value = {
         formula: "SUM(ROUND(D1:D3, 0))",
         result: 0,
         date1904: false,
     };
     await workbook.xlsx.writeFile( "c:\\temp\\test.xlsx" );

When I open this sheet with Excel (Excel for Microsoft 365 MSO (16.0.13127.20266)) the new “Implicit intersection operator” will be inserted into the formula and breaks it: Sheet-with-iio

Now I have to remove the inserted “@” and the formula works: Sheet-without-iio

Has anybody a solution or workaround for this problem?

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:7

github_iconTop GitHub Comments

5reactions
matteraluscommented, Aug 23, 2021

I had the same issue with XLOOKUP. Entered a “good” version of formula in Excel and saved it. Read the file back through exceljs and the formula printed as “_xlfn.XLOOKUP”. When I specify the formula this way for exceljs it ends up avoiding putting the @ in Excel and the _xlfn is dropped by the time I look at it in Excel (and the formula works!). Same trick seems to work with CONCAT

0reactions
huberdocommented, Aug 19, 2022

The above solution worked in some cases, but for UNIQUE I had to also set a few other value properties. Putting “shareType” to “array” and providing “ref” did the trick. Mostly just commenting in case anyone else has similar issues with that function.

When I try to set the “shareType” to “array” I get: Type ‘{ formula: string; result: number; shareType: string; ref: string; }’ is not assignable to type ‘CellValue’. Object literal may only specify known properties, and ‘shareType’ does not exist in type ‘Date | CellErrorValue | CellRichTextValue | CellHyperlinkValue | CellFormulaValue | CellSharedFormulaValue’.ts(2322)

Any ideas why (in TypeScript) shareType is not accessible?

Thank you for your help!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Excel implicit intersection and @ operator - Ablebits
Implicit intersection in Excel means reducing multiple values to a single value. Normally, it occurs when an array or range is supplied to...
Read more >
Implicit intersection operator: @ - Microsoft Support
The implicit intersection operator (@) may return a value, single cell range, or an error. The implicit intersection operator (@) is in a...
Read more >
How to get rid of the implicit intersection operator ... - Quora
Get a Q-Tip, dip it in some rubbing alcohol and clean off all the debris and potato chip crumbs that are preventing the...
Read more >
Excel Intersection 101: Implicit Intersection - The Excel Codex
You will see every cell has a different formula. The formulas are consistent but if there was an error, would you easily spot...
Read more >
Excel corrupting formula with - epplus - Stack Overflow
@ isn't necessary invalid, depending on your version. It is the implicit intersection operator that was introduced in versions that support ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found