Spire.XLS is a professional Excel API that enables developers to create, manage, manipulate, convert and print Excel worksheets. Get free and professional technical support for Spire.XLS for .NET, Java, Android, C++, Python.

Thu Jan 22, 2015 10:32 am

Hi,
i have a problem with spire.xls i have to set a formula like this:

worksheet1.Range((righe + 3), 27).Formula = "=sum(F33079612!z1224;F33079613!z1000;F33079614!z30)"

this is a sum of cells from some different sheets but in my asp.net page it returs exception:

z1224 is not valid named range

Thans in advantage

Sintia
 
Posts: 11
Joined: Mon Sep 15, 2014 10:09 am

Fri Jan 23, 2015 1:28 am

Dear Sintia,

Thanks for your inquiry.

You have a wrong format of the formula, please replace it with following one:

worksheet1.Range((righe + 3), 27).Formula=SUM(F33079612!Z1224:F33079613!Z1000:F33079614!Z30)
Best Regards,
Burning
E-iceblue Support Team
User avatar

burning.liu
 
Posts: 406
Joined: Mon Aug 04, 2014 6:47 am

Fri Jan 23, 2015 9:18 am

thanks for the reply,

Yes if i change ; with : the debug work without exception and the xls file will be generated but when i open it the cells containing the formula dont return any value i need to change in excel : with ; again

i have italian version of office 2010 this can be a problem?, because the formula =sum in my excel become =somma

ho i can resolve this?

Sintia
 
Posts: 11
Joined: Mon Sep 15, 2014 10:09 am

Fri Jan 23, 2015 9:31 am

Hi,

i have solve the problem using + sign like that, now is working:

worksheet1.Range((righe + 3), 27).Formula = "=(F33079612!Z1224+F33079613!Z1000+F33079614!Z30)"

Thanks for support

Sintia
 
Posts: 11
Joined: Mon Sep 15, 2014 10:09 am

Fri Jan 23, 2015 9:41 am

Dear Sintia,

Glad to hear that your problem has been resolved.

Please feel free to contact us if you have any questions.
Best Regards,
Burning
E-iceblue Support Team
User avatar

burning.liu
 
Posts: 406
Joined: Mon Aug 04, 2014 6:47 am

Return to Spire.XLS