We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Aspose change #N/A into some odd thing like '#N'()/A() or '#N'/A

sample code:

Workbook workbook = new Workbook();

Worksheet orders = workbook.Worksheets[0];

Worksheet hidden = workbook.Worksheets.Add("hidden");

orders.Name = "orders";

Range range = orders.Cells.CreateRange("A1", "A1");

range.Name = "OPENLEVEL";

orders.Cells["A1"].PutValue("enter 160 here");

string v4 = "=ROUND(0.0078125*ROUNDDOWN(ROUND(MIN(OPENLEVEL,IF(MIN(IF(114.014379923409>OPENLEVEL,OPENLEVEL,#N/A),112.7578125)<114.014379923409,MIN(IF(114.014379923409>OPENLEVEL,OPENLEVEL,#N/A),112.7578125),#N/A))/0.0078125,9),0),9)";

hidden.Cells["A1"].Formula = v4;

workbook.Save("test8.xls");

Hi,

After simply test this issue, we have found the bug.We will fix it soon.Thanks for your patience.

Hi,

Please try this fix.

We fixed the bug of setting the formula which contains "#/A".

Thank you

This seems to fix the problem

this introduced new problem, value of cell G7 in program is "MOO" and in excel is "#N/A"

Workbook workbook = new Workbook();

Worksheet orders = workbook.Worksheets[0];

Worksheet hidden = workbook.Worksheets.Add("hidden");

orders.Name = "orders";

Range range = orders.Cells.CreateRange("A2", "A2");

range.Name = "OPENLEVEL";

Range range2 = orders.Cells.CreateRange("A4", "A4");

range2.Name = "SWAPPOINTS";

hidden.Cells["F101"].Formula =("=ROUND(0.0001*ROUNDUP(ROUND(MAX(OPENLEVEL,IF(1.3569>MAX(1.34508962328404,IF(1.35641037671596>OPENLEVEL,OPENLEVEL,#N/A)),1.3569,#N/A))/0.0001,9),0),9)");

orders.Cells["G7"].Formula=("=IF((IF(OPENLEVEL>=hidden!$F$101,\"MOO\",hidden!$F$101))=\"MOO\",\"MOO\",IF(OPENLEVEL>=hidden!$F$101,\"MOO\",hidden!$F$101)-SWAPPOINTS)");

orders.Cells["A2"].PutValue(1.3586);

orders.Cells["A4"].PutValue(0.0021);

workbook.CalculateFormula();

object o = orders.Cells["G7"].Value;

Console.WriteLine(o);

workbook.Save("test8.xls");

Hi,

Thanks for providing us the sample code with details,

Yes, we found the issue as you have described, we will figure it out soon.

Thank you.

Hi,

Please try the fix in <A href="</A><BR></P>