Hi,
I am using Aspose.Cells.dll (5.3.1.0) in my project to convert our XML file to XLS or XLSX format.
Conversion is working fine.
After conversion I try to import the date from the converted XLSX file, in to blank Excel file using following procedure
Open Excel 2010
go to Data tab
click on From other sources - > from Microsoft query
select Excel Files.* in database tab
select the converted excel file from the location where it is stored
Expand the Process Elements
and you will see the error message
"Unexpected error from external database driver (1)."
------------------------------------------------------------
This whole thing works fine if the file is converted in XLS format
------------------------------------------------------------
The above procedure also works fine if we open the converted XLSX file and save it again in Excel and then try to import data it does not show any error messsage.
I am attaching converted XLSX file using Aspose.Cells.dll, just in case if you want to reproduce it.
can you please help me
Thanks
Hi,
Hi,
Thanks for your reply.
I have tried with the latest version and I am still getting the same error message.
I am attaching our XML file.
just to let you know that I am passing this XML as stream to aspose and then saving it in XLSX format.
Thanks
Hi,
I loaded your xml file and saved it in xlsx format, it is working fine.
Please download the latest version:
Aspose.Cells
for .NET v7.1.0.6
See the following code and the output file.
C#
string filePath = @“F:\Shak-Data-RW\Downloads\d3.xml”;
Workbook workbook = new Workbook(filePath);
workbook.Save(filePath + “.out.xlsx”);
Hi,
I did mention in my first mail that it is converting from XML to XLSX format properly, its failing when you try to use that converted file for importing data to blank Excel file.
Conversion is working fine.
After conversion I try to import the date from the converted XLSX file, in to blank Excel file using following procedure
Open Excel 2010
go to Data tab
click on From other sources - > from Microsoft query
select Excel Files.* in database tab
select the converted excel file from the location where it is stored
Expand the Process Elements
and you will see the error message
"Unexpected error from external database driver (1)."
------------------------------------------------------------
This whole thing works fine if the file is converted in XLS format
------------------------------------------------------------
The
above procedure also works fine if we open the converted XLSX file and
save it again in Excel and then try to import data it does not show any
error messsage.
Can you reproduce this issue on your machine?
if possible can we do live chat ?
Thanks
Hi,
Hi,
I have tried the latest version of Aspose dll (7.1.0.6), but I am still getting the same error message.
I am attaching our .XML file(d3.xml) and below is the code how I convert my .XML file to XLSX file
----------------------------------------------------------------------------------------------
Public Shared Function AsConvertXML(ByVal stream As IO.Stream, ByVal filename As String, ByVal intfilterindex As Integer) As String
'Dim license As Aspose.Cells.License = New Aspose.Cells.License()
'license.SetLicense(“Aspose.Cells.lic”)
Dim wb As Workbook
Dim strerror As String = “”
Try
wb = New Workbook(stream)
If intfilterindex = 1 Then
wb.Save(filename, Aspose.Cells.SaveFormat.Excel97To2003)
ElseIf intfilterindex = 2 Then
wb.Save(filename, Aspose.Cells.SaveFormat.Xlsx)
End If
Catch ex As Exception
strerror = ex.ToString
Return strerror
End Try
End Function
-----------------------------------------------------------------------------------------------
once the file is converted to .XLSX format I open that file in blank Excel Sheet.
I have attached .XLSX file (d3.xlsx).
I have attached 5 screen shots which shows the steps to reproduce the error message
Image 1.jpg---- shows open new excel sheet in Excel 2010
Image 2.jpg---- shows go to from Microsoft Query
Image 3.jpg---- shows after clicking on Microsoft Query, dialog box appears to select the data source in our case it would be Excel Files.* and click OK
Image 4.jpg---- shows select the Excel file which in our case it would be d3.xlsx file and click OK
Image 5.jpg---- shows when you expand Process Elements you get the error message.
If you need any thing else do let me know
Thanks
Hi,
Hi,
I have tried the steps on MS Excel 2007 and I am getting different dialog box saying
“ODBC Excel Driver Login Failed” and error message inside it is "External table is not in the expected format"
Any ideas why its not working?
Thanks
Hi,
Hi,
For this issue, please let use following option for saving the xlsx file:
C#
OoxmlSaveOptions opt = new OoxmlSaveOptions();
opt.ExportCellName = true;
wb.Save(result, opt);
Hi,
This seems to be working fine.
I am not getting any error message after importing data.
we will be doing some more testing and see if any everything is ok.
Thanks for sorting that out.
just out of curiosity, what I was doing wrong in the code that I send in previous post ?
Thanks for your help
Hi,
Actually, we do not export the cell name in default mode, so the output file is generally smaller than Excel.
If ExportCellNames is true, the cell name will be exported to generated file.