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 Oct 18, 2022 10:33 am

Several problems I find with a simple "load" and "save"

- Images are lost
- Cells widths and heights are lost.
- Zoom is lost.
- I have some hidden tabs and they are saved as visible.
- Tabs in my original spreadhseet are coloured, but when saved they lose the color.

Aso, I get this error when I open the file (file attached)

Why is this?

Code: Select all
var workbook = new Workbook();
workbook.LoadFromFile("file.xlsx");
workbook.SaveToFile("file2.xlsx");
Attachments
spire open.png
error on open excel
spire open.png (6.21 KiB) Viewed 2090 times

xel_wise
 
Posts: 13
Joined: Thu Sep 15, 2022 8:33 am

Wed Oct 19, 2022 5:43 am

Hello,

Thanks for your inquiry.
Sorry we have not received any attached documents from this post. Please upload it again. If it exceeds the size limitation for attachment. You could upload it to the DropBox or OneDrive and then share the download link with us. Thank you in advance.

Sincerely,
Simple
E-iceblue support team
User avatar

Simple.Li
 
Posts: 248
Joined: Fri Jul 01, 2022 2:33 am

Mon Oct 24, 2022 8:41 am

Hello,

Could you please let us know how is your issue going? Thanks in advance for your feedback and time.

Sincerely,
Simple
E-iceblue support team
User avatar

Simple.Li
 
Posts: 248
Joined: Fri Jul 01, 2022 2:33 am

Tue Oct 25, 2022 10:57 am

Hello

the contents of the excel file we are using are confidential and cannot be shared I'm afraid.

Is there a way I can check the validity and/or format of the excel file without compromising the contents?

Thanks

xel_wise
 
Posts: 13
Joined: Thu Sep 15, 2022 8:33 am

Wed Oct 26, 2022 3:34 am

Hello,

Thanks for your feedback.
The problems you encountered must be related to the content of your excel file. If you were using an old version, as for your situation, we suggest that you first try again with our latest version(Spire.XLS 12.10.1). If the issue still exists, we still need your file to locate the root reason. You could remove or replace the confidential data from your document, just make sure the modified file can reproduce your issue. Don’t worry, we take customers’ confidential information as seriously as them and never use it for any other purpose. You also can send the file to us via email(lisa.li@e-iceblue.com). Thanks in advance.

Sincerely,
Lisa
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1261
Joined: Wed Apr 25, 2018 3:20 am

Thu Oct 27, 2022 8:45 am

Hello

I think we have identified the problem.

We get an error whenever we add this validation to a cell of type "Number" (screenshot attached validation.jpg)

If we remove the validation the file gets processed ok.

Is there anything wrong with this validation?

Thanks
Attachments
validation.jpg
validation.jpg (53.29 KiB) Viewed 2039 times

xel_wise
 
Posts: 13
Joined: Thu Sep 15, 2022 8:33 am

Thu Oct 27, 2022 10:06 am

Hello,

Thanks for your feedback.
Based on your screenshot, I tried to add this validation by using MS Excel2016. But I got an error. However, if I added a valid data range, then I use our product to load and save it. There is no any problems. I have attached a screenshot and my testing file for you reference. If your file is different from this two situations, please share us with your testing file for further investigation.

Sincerely,
Lisa
E-iceblue support team
Attachments
testFiles.zip
(39.84 KiB) Downloaded 152 times
User avatar

Lisa.Li
 
Posts: 1261
Joined: Wed Apr 25, 2018 3:20 am

Thu Oct 27, 2022 12:16 pm

We are using Office 365 and it allows us to add that validation, just so you know.

Thanks so much or your help!

xel_wise
 
Posts: 13
Joined: Thu Sep 15, 2022 8:33 am

Fri Oct 28, 2022 1:41 am

Hello,

Thanks for your more information.
Even using office 365, the error still exists as shown in the below screenshot.
365.jpg
365.jpg (50.19 KiB) Viewed 2017 times

To help us look into your issue accurately, you can simulate a sample file and share it with us for testing. Thanks in advance.

Sincerely,
Lisa
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1261
Joined: Wed Apr 25, 2018 3:20 am

Fri Oct 28, 2022 10:38 am

Hello,

we can add that validation

Check this video:

https://imgur.com/a/NqbkvQP

xel_wise
 
Posts: 13
Joined: Thu Sep 15, 2022 8:33 am

Mon Oct 31, 2022 10:07 am

Hello,

Thanks for your feedback.
Based on your video, It seems that the value you set was "-9.99999999999999E+145" but not " -9,99999999999999E+159", it is not a comma. However, even using this to test, I also was unable to reproduce your issue. The attachment is my testing file. I am afraid that your issue is still caused by other elements of your file. To help further locate the root reason, we still need you to share a file to help us reproduce your issue. Thanks in advance.

Sincerely,
Lisa
E-iceblue support team
Attachments
test.zip
(6.81 KiB) Downloaded 146 times
User avatar

Lisa.Li
 
Posts: 1261
Joined: Wed Apr 25, 2018 3:20 am

Wed Nov 02, 2022 9:44 am

Hello

could you analyze the attached excel file?

Try to open it and save it with Spire. Then try to open it and you will get an error message.

Let us know.

Thanks
Attachments
error.zip
(22.98 KiB) Downloaded 146 times

xel_wise
 
Posts: 13
Joined: Thu Sep 15, 2022 8:33 am

Thu Nov 03, 2022 9:38 am

Hello,

Thank you for sharing.
I tested your file but still didn't encounter any issue. I have uploaded my testing program, you can check and test it on your side directly. If there is any issues, please let us know your system information (E.g. Win10, 64 bit) and region setting (E.g. China, Chinese).

Sincerely,
Lisa
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1261
Joined: Wed Apr 25, 2018 3:20 am

Thu Nov 03, 2022 4:33 pm

Hello

yes when I run your program, the excel "mas_error_to_spire.xlsx" opens with the same error message (attached)

but if I open the one that I suppose you already generated "mymas_error_to_spireout.xlsx" it opens ok with no errors.

weird!

I'm running Windows 10 64 bit, Spain region, English language.

Do you need anything else to try to find the root of the problem?

Thanks
Attachments
error_spire.png
error_spire.png (7.46 KiB) Viewed 1944 times

xel_wise
 
Posts: 13
Joined: Thu Sep 15, 2022 8:33 am

Fri Nov 04, 2022 8:34 am

Hello,

Thanks for your feedback.
My previous tests are based on the region setting (China/Chinese), when I set it as (Dutch/English), I did reproduce your issue. I have logged this issue into our bug tracking system by using the ticket SPIREXLS-4254. Our Dev team will do more investigations to fix it. Once there is any update, I will inform you asap.
Meanwhile, as a workaround that you can add the following code snippet to avoid this issue.
Code: Select all
Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture("en-EN");
Workbook workbook = new Workbook();

Sincerely,
Lisa
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1261
Joined: Wed Apr 25, 2018 3:20 am

Return to Spire.XLS

cron