Issue with .XLSX format

Last post 02-14-2012, 5:02 AM by mshakeel.faiz. 12 replies.
Sort Posts: Previous Next
  •  02-09-2012, 10:54 AM 360452

    Issue with .XLSX format .NET

    Attachment: Present (inaccessible)
    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
     
  •  02-09-2012, 11:42 AM 360467 in reply to 360452

    Re: Issue with .XLSX format

    Hi,

    Could you try our latest version/fix: Aspose.Cells for .NET v7.1.0.5 

    If you still find the issue, kindly attach your source XML file here, we will check your issue soon.

    Thank you.

    Amjad Sahi
    Support Developer,
    Aspose Sialkot Team
    Contact Us
     
  •  02-10-2012, 7:21 AM 360725 in reply to 360467

    Re: Issue with .XLSX format

    Attachment: Present (inaccessible)
    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
     
  •  02-10-2012, 10:21 AM 360787 in reply to 360725

    Re: Issue with .XLSX format

    Attachment: Present (inaccessible)
    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");


    Many Thanks and Kind Regards,

    Shakeel Faiz
    Support Developer
    Aspose Sialkot Team
    Contact Us
    Aspose - The .NET and Java Component Publisher

    Keep in touch! We're on Twitter and Facebook
     
  •  02-10-2012, 10:42 AM 360794 in reply to 360787

    Re: Issue with .XLSX format

    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
     
  •  02-10-2012, 11:43 AM 360806 in reply to 360794

    Re: Issue with .XLSX format

    Hi,

    Did your try v7.1.0.6 Shakeel Faiz used? I could not find the issue in MS Excel 2007 precisely. Please give us the screen shots of the steps in MS Excel and attach them to point out the issue. We will log your issue soon.

    Thank you.

    Amjad Sahi
    Support Developer,
    Aspose Sialkot Team
    Contact Us
     
  •  02-13-2012, 4:15 AM 361049 in reply to 360806

    Re: Issue with .XLSX format

    Attachment: Present (inaccessible)
    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

     
  •  02-13-2012, 5:20 AM 361078 in reply to 361049

    Re: Issue with .XLSX format

    Hi,

    Could you test your steps in MS Excel 2007, I could not evaluate/test it as MS Query is not installed on my MS Excel 2010 version. I have tested it in MS Excel 2007 though even using your attached d3.xlsx file, it works fine and I can extract data from the source tables.

    Thank you.

    Amjad Sahi
    Support Developer,
    Aspose Sialkot Team
    Contact Us
     
  •  02-13-2012, 10:46 AM 361164 in reply to 361078

    Re: Issue with .XLSX format

    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
     
  •  02-13-2012, 12:12 PM 361191 in reply to 361164

    Re: Issue with .XLSX format

    Hi,

    That is really strange. I am not sure if this is an issue with our product or something else at your side as it works fine in my Excel 2007. I do not get any error but as you mentioned that you are getting error in Excel 2010 and 2007 (as well) as per your posted steps and screen shots (in the previous posts).

    Anyways, we need to thoroughly investigate the issue, we will do it soon. A ticket is logged with an id: CELLSNET-40372. We will look into it.


    Thank you.

    Amjad Sahi
    Support Developer,
    Aspose Sialkot Team
    Contact Us
     
  •  02-13-2012, 10:27 PM 361289 in reply to 361164

    Re: Issue with .XLSX format

    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);


    Many Thanks and Kind Regards,

    Shakeel Faiz
    Support Developer
    Aspose Sialkot Team
    Contact Us
    Aspose - The .NET and Java Component Publisher

    Keep in touch! We're on Twitter and Facebook
     
  •  02-14-2012, 4:16 AM 361399 in reply to 361289

    Re: Issue with .XLSX format

    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

     
  •  02-14-2012, 5:02 AM 361418 in reply to 361399

    Re: Issue with .XLSX format

    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.
    Many Thanks and Kind Regards,

    Shakeel Faiz
    Support Developer
    Aspose Sialkot Team
    Contact Us
    Aspose - The .NET and Java Component Publisher

    Keep in touch! We're on Twitter and Facebook
     
View as RSS news feed in XML