Hi team.
I have a problem in using "VLOOKUP".
When inputing data directly using Excel, I get the correct value.
But I can't get the correct value from my program.The return value will be "#N/A".
--- from ---
var inputExcelFile = new FileInfo("book1.xlsx");
using (var inputFile = new ExcelPackage(inputExcelFile))
{
var sheet = inputFile.Workbook.Worksheets["Sheet1"];
sheet.Cells["B3"].Value = "ABC_123";
sheet.Calculate("C3");
var value = sheet.Cells["C3"].Value;
}
--- to ---
I debuged a little bit and got why "#N/A" is returned.
If the "table_array" doesn't contain "RichText", I get the correct value.
But, if the "table_array" value in VLOOKUP function has "RichText" (for example, partially set the font to bold), the matching with the lookup_value will be matched with "RichText" and match will be FALSE.
Is my usage is incorrect?
Could anyone help me?
I'll attach a sample file.
# I'm japanese.Sorry for my bad English.
I have a problem in using "VLOOKUP".
When inputing data directly using Excel, I get the correct value.
But I can't get the correct value from my program.The return value will be "#N/A".
--- from ---
var inputExcelFile = new FileInfo("book1.xlsx");
using (var inputFile = new ExcelPackage(inputExcelFile))
{
var sheet = inputFile.Workbook.Worksheets["Sheet1"];
sheet.Cells["B3"].Value = "ABC_123";
sheet.Calculate("C3");
var value = sheet.Cells["C3"].Value;
}
--- to ---
I debuged a little bit and got why "#N/A" is returned.
If the "table_array" doesn't contain "RichText", I get the correct value.
But, if the "table_array" value in VLOOKUP function has "RichText" (for example, partially set the font to bold), the matching with the lookup_value will be matched with "RichText" and match will be FALSE.
Is my usage is incorrect?
Could anyone help me?
I'll attach a sample file.
# I'm japanese.Sorry for my bad English.