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 Mar 17, 2020 12:59 am

Hi I am using FreeSpire.XLS To load and save a . xlsb file as a pipe delimited file.When i open the file in Excel i can see all the fields but the saved csv file does not have data in any field other then the three fields which have dates.Can u suggest for me to try something .When debugging and reading the csv line data , those fields are empty.It is a critical timeline.Could you please help and suggest what could be wrong .

nsrivastava_iceblue
 
Posts: 4
Joined: Tue Mar 17, 2020 12:26 am

Tue Mar 17, 2020 2:47 am

Hello,

Thanks for your inquiry.
I simulated a .xlsb file and tested your case, but didn't reproduce your issue. To help us further look into it, please provide the following information.
1) Your input file, your full code as well as your output file.
2) Your environment information, such as OS information (E.g. Windows 7, 64bit) and Region setting (E.g. China, Chinese).
You could attach them here or send them to us(support@e-iceblue.com) via email. Thanks in advance.

Sincerely,
Rachel
E-iceblue support team
User avatar

rachel.lei
 
Posts: 1571
Joined: Tue Jul 09, 2019 2:22 am

Tue Mar 17, 2020 2:30 pm

Hello thanks for responding
Unfortunately i can't post the file .The file has data we cannot share.But i can tell you some stuff happening.
When i open the file in excel and then save as xlsb .The same code works.
Also its reading the total number of columns as 28 when actually the number of columns are 32.
The code is able to read the dates fields.When i go and check the cell format for them in excel its set to Date.But for the text fields the format is set as General.

Debugging thru and checking properties.They don't show any values.I tried to set the Number Format as Text for all the other cells other then Dates and then save the file as CSV but i get no value.
for (int i = 0; i <= sheet.LastColumn; i++)
{
if (i != 0 && i != 4 && i != 27)
{
cells = sheet.Columns[i].CellList;
foreach (CellRange cell in cells)
{
string numberText = cell.NumberText;
double numberValue = cell.NumberValue;
string displayText = cell.DisplayedText;
string text = cell.Text;
string x = cell.Value;
Object onj = cell.Value2;

nsrivastava_iceblue
 
Posts: 4
Joined: Tue Mar 17, 2020 12:26 am

Wed Mar 18, 2020 3:43 am

Hello,

Thanks for your response.
According to your description, I simulated a .xlsb file and converted it to the csv file using Free Spire.XLS for .NET Version:10.1 and the latest commercial version Spire.XLS Pack(Hotfix) Version:10.3.0, but the output file contained the complete data. Here I uploaded my testing project for your reference, please directly run it on your side. And you could also replace the input file with yours to have a try.
http://www.e-iceblue.com/downloads/demo/Demo20909.zip

If the issue still occurs with your file, since it's difficult to locate the issue without your input file, please share your input file with us for further investigation. You could send it to us(support@e-iceblue.com) via email.

Don’t worry, we promise to keep your document confidential and we will not use it for any other purpose. Besides, you could also remove the security data of your file as long as the modified file could reproduce your issue.

Sincerely,
Rachel
E-iceblue support team
User avatar

rachel.lei
 
Posts: 1571
Joined: Tue Jul 09, 2019 2:22 am

Thu Mar 19, 2020 9:22 pm

So the reason i can not post the file after hiding data is that as soon as it is opened by excel and saved again as xlsb file the code works .
I will update you if the client can present us with some random data generated by the system in the same format.
One thing which I can see in the xlsb file is that, for the date column the number format is being read as Date and the date columns are being read fine by FeeSpire.
But for the other columns which are text, the format is being read as General and these columns are not being read by the library at all ,I mean they show blank.

nsrivastava_iceblue
 
Posts: 4
Joined: Tue Mar 17, 2020 12:26 am

Fri Mar 20, 2020 6:02 am

Hello,

Thanks for your response.
We are looking forward to your input file to do further investigation.
Besides, did you run my testing project? When I tested it, both text format and date format data could be read successfully.

Sincerely,
Rachel
E-iceblue support team
User avatar

rachel.lei
 
Posts: 1571
Joined: Tue Jul 09, 2019 2:22 am

Fri Mar 20, 2020 1:25 pm

I will .Many thanks for you responses.

nsrivastava_iceblue
 
Posts: 4
Joined: Tue Mar 17, 2020 12:26 am

Mon Mar 23, 2020 2:00 am

Hello,

You're welcome.
Look forward to your good news and hope you are well.

Sincerely,
Rachel
E-iceblue support team
User avatar

rachel.lei
 
Posts: 1571
Joined: Tue Jul 09, 2019 2:22 am

Return to Spire.XLS