0

I am using SpreadsheetGear 2017 (the latest) to read an Excel 2016 .xlsm file. One cell is giving me a #Ref! error when I debug, even though the cell displays the value fine in the spreadsheet itself.

The cell's formula is MY_OUTPUT=IF(ISBLANK(NAME_INPUT),"Please Enter Name",OUTPUT_1)

The OUTPUT_1 cell's AllowEdit property is false. Could that cause a problem? The code is basically

SpreadsheetGear.IWorksheet worksheet = workbook.Worksheets[0];
SpreadsheetGear.IRange cells = worksheet.Cells;
string test1 = cells["MY_OUTPUT"].Text; //Text = #Ref!

What could be a possible cause of this error?

Revision: The cell references another cell, which references a hidden worksheet cell(s), which I didn't know about, and it was not captured by the code. Unfortunately, I can't share the Excel file as it's confidential. I would appreciate any guidance as to how to use SpreadSheetGear with both worksheets of the Excel file.

jenn
  • 11
  • 2
  • There's no chance of answering this question without knowing anything about the actual workbook involved. Can you revise your question with a link to the Excel file? – Tim Andersen Feb 27 '18 at 22:02
  • Tim, thanks for responding. I added more information to my original post. Can you please point me in the correct direction? – jenn Feb 28 '18 at 15:37
  • Unfortunately, this still does me no good. From my (and any other's) perspective, your Excel file is a black box and is almost certainly playing a significant role in this issue. Without access to the contents of this "black box" there's no to know what the root issue is. Suggestion--if you have SpreadsheetGear for .NET installed on your machine, you should have a "SpreadsheetGear for Windows" app available under the Start Menu. You might try doing a File -> Open... on this file to visibly scroll around and see if you can further isolate the issue on your own. – Tim Andersen Feb 28 '18 at 15:45

0 Answers0