Reference to an other sheet in formula
See original GitHub issueHi, I have a problem using formula and Sheet reference.
I am using this :
sheet.getCell('A2').dataValidation = {
type: 'list',
allowBlank: true,
formulae: ['Company.A2:A500'],
showInputMessage: true,
promptTitle: 'Company',
prompt: 'In which company the user is in.',
};
And when I generate the XLSX and open the file with libre office I get ‘company.a2:A500’ in data validation and it don’t work.
I guess there is a bug in Sheet name handling, at some point you seems to put some data in lowercase.
If you have a patch I take it please! 😃
PS: I did try this too, and it gives the same behavior
sheet.getCell('A2').value = {
formula: 'Company.A10',
value: '',
};
Issue Analytics
- State:
- Created 6 years ago
- Comments:7
Top Results From Across the Web
Excel reference to another sheet or workbook (external ...
To reference a cell or range of cells in another worksheet in the same workbook, put the worksheet name followed by an exclamation...
Read more >Excel Reference Another Sheet | CustomGuide
1. Click the cell where you want to insert the reference. 2. Type = to start building the reference. 3. Select the worksheet...
Read more >How to Reference Another Sheet or Workbook in Excel (with ...
Type the following formula in the current sheet (where you need the result): =Sum( Enter the formula to the point where you need...
Read more >Excel Reference to Another Sheet - WallStreetMojo
So, to reference an Excel cell or range of cells from another sheet, we need to get a worksheet name first, i.e., Sheet1,...
Read more >Create an external reference (link) to a cell range in another ...
Select the cell or cells where you want to create the external reference. Type = (equal sign). Switch to the source workbook, and...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I couldn’t get formulas linking to other worksheets to work, but I managed to work around this via the Defined names functionality, as @GregoryNEUT helpfully suggested.
Here is a short snippet illustrating this, in case anyone finds their way to this thread
I faced the same issue, went through the most part of the code of exceljs trying to fix it, seems it correctly generates the xml.
I corrected it by using (!) instead of (.)
Eg.
sheet.getCell(‘A2’).dataValidation = { type: ‘list’, allowBlank: true, formulae: [‘Company!A2:A500’], showInputMessage: true, promptTitle: ‘Company’, prompt: ‘In which company the user is in.’, };
Excel just shows a . but we need to use ! instead.