Importing excel files

Posted by: yianeco on 11 September 2017, 3:14 pm EST

    • Post Options:
    • Link

    Posted 11 September 2017, 3:14 pm EST

    I am having problems importing excel files with .xlsx or even .xls sometimes extension (Spread 8 COM).

    The process hangs and the form becomes unusable.

    I am attaching an excel file that creates such a problem.

    I am using ImportExcelBook.

    Please advise

    Regards

    Yiannis

  • Posted 12 September 2017, 2:31 am EST

    Hi Yiannis,

    It seems that because the technical issues in website currently, your attachments did not get through. You may again try to attach the sample application or create a ticket for your issue here:

    https://www.grapecity.com/en/support/new-ticket?product=spread

    Sorry for the inconvenience.

    Thanks,

    Deepak Sharma

  • Posted 19 September 2017, 5:25 pm EST

    Hi,

    I am attaching the excel file again.

    Thanks

    YiannisTestExcel.zip

  • Posted 24 September 2017, 6:18 pm EST

    Hi Yiannis,

    Sorry for the long delay in getting back to you. I am able to open the Excel file provided by you with Spread 8 COM.

    I used the unicode version of Spread 8 COM to open your Excel file because it is not in English using the code as follows:

    fpSpread1.OpenExcel2007File “C:\QS-LIS DOMOPLUS 2ïêëä.xlsx”, “”, -1, -1, “”

    Please test the same with unicode version and let me know. I have also attached an image for your reference.

    Thanks,

    Deepak Sharma

  • Posted 25 September 2017, 1:46 pm EST

    Hi Deepak,

    Thanks for the feedback.

    What is the difference of OpenExcel2007File and ImportExcelWorkbook methods?.

    When do you suggest to use each one ?

    Yiannis

  • Posted 25 September 2017, 7:25 pm EST

    Hi Yiannis,

    OpenExcel2007File is a new method which was introduced with Spread 8. It is specifically used to import .xlsx files.

    Whereas ImportExcelWorkbook is the old supported method to import Excel(xls) files.

    In case you are working with the xlsx files, you should use OpenExcel2007File() method.

    Thanks,

    Deepak Sharma

  • Posted 25 September 2017, 8:08 pm EST

    Thanks,

    Some more questions please,

    1. Can I use OpenExcel2007File to open .xls files ?
    2. What is the next log text mean ? (what is 120?)

    ===== FarPoint Technologies, Inc =====

    ===== Begin of Excel Workbook General Load =====

    26-09-17 12:04:25 PM

    Col Row Information


    	120:Import Excel File: F:\Temp\QS-LIS DOMOPLUS 2ΜΙΚΕ.xlsx
    

    ===== End of Excel Workbook General Load =====

    Regards

    Yiannis

  • Posted 26 September 2017, 6:15 pm EST

    Hi Yiannis,

    OpenExcel2007File method can be used only to open xlsx format Excel files.

    The log file contains the information about the conversion of the Excel-formatted file which is imported to Spread. ‘120’ is the message number for the successful message in the log file.

    It uses many other message numbers to display information about imported data.

    In case you do not wish to create a log file , do not provide the log file name and set it to “”.

    for example:

    fpSpread1.OpenExcel2007File “C:\QS-LIS DOMOPLUS 2ïêëä.xlsx”, “”, -1, -1, “”

    Thanks,

    Deepak Sharma

  • Posted 27 September 2017, 1:24 pm EST

    Thanks, I have located the codes in the reference manual regarding importing/exporting excel files but I could not find number 120.

    Regards

    Yiannis

  • Posted 27 September 2017, 9:09 pm EST

    Hi Yiannis,

    In log file ‘120’ is the message number kept for internal use. There are several other messages numbers(codes) that give information about the success or failure of the import/export.

    Thanks,

    Deepak Sharma

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels