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

Free Support Forum - aspose.com

Error converting Excel2003XML to XLSX

I am trying to convert Excel2003XML to a new XLSX document. When I set LoadDataOnly = True it works without error, but with some formatting differences. When I set LoadDataOnly = False, then I get the following error:

"Excel completed file level validation and repair. Some parts of this workbook may have been repaired or discarded.
Removed Records: View from /xl/worksheets/sheet1.xml part"

Is there a work-around to this error? I have already upgraded to the lastest version of aspose.cells (v5.1.1).

Here is my code:

Dim TempFileName As String = "C:\Temp\Temp.xls"

Dim lOptions As New Aspose.Cells.LoadOptions(Aspose.Cells.LoadFormat.Excel2003XML)

lOptions.LoadDataOnly = False

Dim wb As Aspose.Cells.Workbook = New Aspose.Cells.Workbook(WBTemplateName)

Dim wb2 As Aspose.Cells.Workbook = New Aspose.Cells.Workbook

Dim wb3 As Aspose.Cells.Workbook = New Aspose.Cells.Workbook

wb2.Copy(wb)

wb2.Save(TempFileName, Aspose.Cells.SaveFormat.Excel97To2003)

wb3.Copy(wb2)

wb3.Save(FileName, Aspose.Cells.SaveFormat.Xlsx)

wb = Nothing

wb2 = Nothing

wb3 = Nothing


This message was posted using Aspose.Live 2 Forum

Hi,

Can you please send us your XLS files so that we can perform test on that in order to get more effective test results.

Thanks,

Yes, I have attached 3 files. The spreadsheetML file, the excel 2003 file (1st conversion), and the excel XLSX file (2nd conversion) that gives the error.

Hi,

I can find the issue using your sample code and template xml file, we will figure it out soon.

I have logged your issue into our issue tracking system with an id: CELLSNET-19048.

Thank you.


.

Hi,

Please try the attached version.

<span style=“font-size: 11pt; font-family: “Arial”,“sans-serif”;”>We have fixed your mentioned issue.


<span style=“font-size: 11pt; font-family: “Arial”,“sans-serif”;”>

<span style=“font-size: 11pt; font-family: “Arial”,“sans-serif”;”>Thank you
<o:p></o:p>


Thanks. Everything working great.

The issues you have found earlier (filed as CELLSNET-19048) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.

Just like before, I am trying to convert Excel2003XML to a new XLSX document. This time the XLSX document is never created because of the following error:

"Invalid character in the given encoding. Line 1, position 3912"

I have attached the SpreadsheetML file that I am trying to convert.

Here is my code:

Try

Dim lOptions As New Aspose.Cells.LoadOptions(Aspose.Cells.LoadFormat.SpreadsheetML)

lOptions.LoadDataOnly = False

Dim wb As Aspose.Cells.Workbook = New Aspose.Cells.Workbook(WBTemplateName, lOptions)

Dim wb2 As Aspose.Cells.Workbook = New Aspose.Cells.Workbook

wb2.Copy(wb)

wb2.Save(FileName, Aspose.Cells.SaveFormat.Xlsx)

wb = Nothing

wb2 = Nothing

lOptions = Nothing

File.Delete(WBTemplateName)

Catch ex As Exception

Throw ex

End Try


Hi bwittsch,

The xml file is invalid.

There is such a node “?/Data>” .

Which tool do you use to create such a file? Please make the file as a standard xml file.

Thanks, I fixed the stylesheet to generate properly formed XML and it worked.

However, I found a similar conversion problem with another SpreadsheetML file. This time the error occurs when excel 2007/2010 trys to open the converted XLSX file.

The error message is: "The converter failed to open the file."

I attached the two files.

Thanks.

Hi,

I have converted your SpreadsheetML file successfully with the latest version of Aspose.Cells for .NET (Latest Version) . Please see the output xlsx file generated from your spreadsheet.

Code [[VB.NET](http://VB.NET)]:

Dim opt As LoadOptions = New LoadOptions(LoadFormat.SpreadsheetML)

opt.LoadDataOnly = False

Dim wb As Workbook = New Workbook(“C:\Downloads\File_SpreadsheetML.xml”, opt)

Dim wb2 As Workbook = New Workbook()

wb2.Copy(wb)

wb2.Save(“C:\Downloads\File_SpreadsheetML.xml.xlsx”)

Looks like the latest verison of Asponse.Cells fixed the problem. Thanks.

Just like before, I am trying to convert Excel2003XML to a new XLSX document. This time the XLSX document is never created because of the following error:

"Invalid character in the given encoding. Line 1, position 18181660".

The file I am coverting is attached. Thanks.

Hi,

Thanks for your posting and using Aspose.Cells for .NET.

I was able to reproduce this problem using the latest version:
Aspose.Cells for .NET v7.1.2.4.

We have logged this issue in our database. Once the issue is fixed, we will let you know asap.

This issue has been logged as CELLSNET-40530.

C#
string filePath = @“F:\Shak-Data-RW\Downloads\Mo_Production_Report.xls”;

Workbook workbook = new Workbook(filePath);

Hi,

The issue is caused by there are some invalid characters in the template file.

Please open the file in text editor and search “U-010193”, you will find those characters.

Could you remove them?

Thanks for your help. I know the problem now.

Hi,

It’s good to know, you were able to figure out this problem.

If you get any other question, please feel free to ask, we will help you asap.