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.

Tue Dec 13, 2016 10:47 am

Exception:
message:
Code: Select all
Unexpected token.Unexpected token type: tInteger, string value:   at position 9. Formula: IF(G30=0,0,ATAN(H30/G30))+IF(G30<0,PI(),IF(H30<0,IF(NOT(G30=0),2*PI(),3*PI()/2),0)), Position: 9

StackTrace:
Code: Select all
   v spr7130.0(String A_0, Exception A_1)
   v spr7130.0(String A_0)
   v spr3778.0(Priority A_0, Dictionary`2 A_1, Int32 A_2, ParseFormulaOptions A_3, ParseParameters A_4)
   v spr3778.0(Priority A_0, Dictionary`2 A_1, Int32 A_2, ParseFormulaOptions A_3, ParseParameters A_4)
   v spr3778.0(ParseFormulaOptions A_0, Dictionary`2 A_1, ParseParameters A_2, ExcelFunction A_3)
   v spr3778.0(Dictionary`2 A_0, Int32 A_1, ParseFormulaOptions A_2, ParseParameters A_3, spr4835 A_4)
   v spr3778.0(Dictionary`2 A_0, Int32 A_1, ParseFormulaOptions A_2, ParseParameters A_3)
   v spr3778.0(Priority A_0, Dictionary`2 A_1, Int32 A_2, ParseFormulaOptions& A_3, ParseParameters A_4)
   v spr3778.0(Priority A_0, Dictionary`2 A_1, Int32 A_2, ParseFormulaOptions A_3, ParseParameters A_4)
   v spr3778.1(String A_0, Dictionary`2 A_1, Int32 A_2, ParseFormulaOptions A_3, ParseParameters A_4)
   v Spire.Xls.Core.Spreadsheet.FormulaUtil.1(String A_0, IWorksheet A_1, Dictionary`2 A_2, Int32 A_3, Dictionary`2 A_4, ParseFormulaOptions A_5, Int32 A_6, Int32 A_7)
   v Spire.Xls.Core.Spreadsheet.FormulaUtil.0(String A_0, IWorksheet A_1, Dictionary`2 A_2)
   v spr2960.0(XmlReader A_0, IInternalWorksheet A_1, Int32 A_2, Int32 A_3, Int32 A_4)
   v spr2960.0(XmlReader A_0, IInternalWorksheet A_1, List`1 A_2, Int32 A_3, Int32 A_4)
   v spr2960.0(XmlReader A_0, IInternalWorksheet A_1, List`1 A_2, String A_3, Int32 A_4)
   v spr2960.0(XmlReader A_0, IInternalWorksheet A_1, List`1 A_2, String A_3)
   v spr2960.0(XmlReader A_0, XlsWorksheet A_1, String A_2, MemoryStream& A_3, MemoryStream& A_4, List`1 A_5, Dictionary`2 A_6, Dictionary`2 A_7)
   v spr9547.1(XlsWorksheet A_0, Dictionary`2 A_1)
   v Spire.Xls.Core.Spreadsheet.XlsWorksheet.ParseData(Dictionary`2 dictUpdatedSSTIndexes)
   v spr2960.0(Dictionary`2 A_0)
   v spr8428.0(List`1& A_0)
   v spr8428.1(List`1& A_0)
   v Spire.Xls.Core.Spreadsheet.XlsWorkbook.0(String A_0, String A_1, ExcelVersion A_2, ExcelParseOptions A_3)
   v Spire.Xls.Core.Spreadsheet.XlsWorkbook..ctor(spr2102 A_0, Object A_1, String A_2, ExcelParseOptions A_3, Boolean A_4, String A_5, ExcelVersion A_6)
   v spr602.0(Object A_0, String A_1, ExcelParseOptions A_2, Boolean A_3, String A_4, ExcelVersion A_5)
   v spr1524.0(String A_0, ExcelParseOptions A_1, Boolean A_2, String A_3, ExcelVersion A_4)
   v Spire.Xls.Workbook.LoadFromFile(String fileName, ExcelVersion version)

Hello, this exception appear every time I call:
Code: Select all
Workbook wb = new Workbook();
wb.LoadFromFile(FileName);
on my a file.
I can not send the whole file because it contain data that I am not allowed to share.
I try to find the cell with similar(simillar, not same, because I use different language) formula and I found this:
Code: Select all
=KDYŽ(G30=0;0;ARCTG(H30/G30))+KDYŽ(G30<0;PI();KDYŽ(H30<0;KDYŽ(NE(G30=0);2*PI();3*PI()/2);0))

It seems to me that the formula is correct.
Can you help me what could be wrong? How I can load this file?

Thanks in advance for your answer.

Kubik
 
Posts: 7
Joined: Tue Oct 11, 2016 3:10 pm

Wed Dec 14, 2016 3:29 am

Dear Kubik,

Thanks for your inquiry.
Please try to use Thread to set current culture, here is sample code for your reference.
Code: Select all
            CultureInfo cc = Thread.CurrentThread.CurrentCulture;
            Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;
            Workbook book = new Workbook();
            book.LoadFromFile("sample document.xlsx");
            ...
            Thread.CurrentThread.CurrentCulture = cc;

If there is any question, welcome to get it back to us.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Wed Dec 14, 2016 8:54 am

Thanks for fast and correct answer.

I have problem with the same file.
I Load the file and just save it with different name, and charts now have points descriptions and some formulas seen not updated automatically after opening with Spire.XLS.
I actually do no edits to document yet.
ImageImage

I am very glad you helping me even if I use only the Free version.
I hope that together we will solve all problems quickly, like this one.
And when the boss will think it brought it works flawlessly, so he buy the Pro version to remove "Evaluation Warning".

Thanks in advance for another quick and useful answer.

Kubik
 
Posts: 7
Joined: Tue Oct 11, 2016 3:10 pm

Wed Dec 14, 2016 9:10 am

Dear Kubik,

Thanks for your feedback.
First I suggest you test the latest Spire.XLS Pack Hotfix Version:7.11.13. And if the issue still exists with the latest version, it is difficult to say what the reason caused this issue if we don't have sample file, so please send the sample file to us(support@e-iceblue.com) via email to help us do an investigation. And we promise to keep it confidential and not to use it for any other purpose.
In addition, you can contact our sales team(sales@e-iceblue.com) to get a temporary license file for one month to remove the warning message and have a better evaluation on our products.

Sincerely,
Betsy
E-iceblue support team
Last edited by Betsy.jiang on Wed Mar 29, 2017 9:10 am, edited 1 time in total.
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Wed Dec 14, 2016 2:51 pm

I try Spire.XLS Pack Hotfix Version:7.11.13 for .NET 4.0, but no change, I create a simple example of the problem.

I limit the code to this:
Code: Select all
                            CultureInfo cc = Thread.CurrentThread.CurrentCulture;
                            Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;
                            try
                            {
                                Workbook wb = new Workbook();
                                wb.LoadFromFile(templateFileDialog.FileName);//IN.xlsx
                               
                                using (Stream s = saveFileDialog.OpenFile())//OUT.xlsx
                                {
                                    wb.SaveToStream(s, Spire.Xls.FileFormat.Version2013);
                                }return;
...................................................................................................
                            }
                            catch (Exception ex)
                            {

                                throw;
                            }finally
                            {
                                Thread.CurrentThread.CurrentCulture = cc;
                            }


I send it to email too.

Thanks in advance for solution.
Attachments
charts.zip
(22.37 KiB) Downloaded 255 times

Kubik
 
Posts: 7
Joined: Tue Oct 11, 2016 3:10 pm

Thu Dec 15, 2016 2:25 am

Dear Kubik,

Thanks for the information.
I have noticed the issue and posted it to our Dev team. Once it is fixed, we will inform you.
Sorry for inconvenience caused.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Thu Jan 26, 2017 11:31 am

Was there a progress?

Kubik
 
Posts: 7
Joined: Tue Oct 11, 2016 3:10 pm

Fri Jan 27, 2017 2:28 am

Hi,

Sorry for late reply.The issue has been resolved in Spire.XLS Pack Hotfix Version:7.11.49. Welcome to test it.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Sat Jan 28, 2017 8:44 am

Thanks now it working as expected.

Kubik
 
Posts: 7
Joined: Tue Oct 11, 2016 3:10 pm

Mon Jan 30, 2017 1:26 am

Hi,

Thanks for your feedback.
Please feel free to contact us if there is any question. We are here for hlep.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Return to Spire.XLS