Author Topic: Excel export format issue during import  (Read 1478 times)

Digitalsoft

  • Pro OEM
  • Newbie
  • *
  • Posts: 49
    • View Profile
Excel export format issue during import
« on: September 24, 2021, 08:32:33 pm »
Hi,

we are trying to export data in .xlsx format and imported the same by establishing OleDbConnection. while importing, we got the below exception during connection open. But if we just open the file, saved them and imported the file, it got successful. so it seems like there is problem in file content type. Can you check the content type of the PQgrid Excel export and tell us whether it is possible to have OleDb supported contentType.

Before save: ContentType="application/vnd.openxmlformats-package.relationships+xml"
After save: ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"

Exception throwed during establishment of OleDbConnection :
Process of Converting Source File data into Datatable didn't happen. System.Data.OleDb.OleDbException (0x80004005): External table is not in the expected format.
   at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection)
   at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject)

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6309
    • View Profile
Re: Excel export format issue during import
« Reply #1 on: September 27, 2021, 09:54:51 am »
pqgrid exported excel file has never been tested with OleDbConnection. Simply replacing ContentType makes it an invalid excel file.

I'm moving it to bug log for further analysis.

Digitalsoft

  • Pro OEM
  • Newbie
  • *
  • Posts: 49
    • View Profile
Re: Excel export format issue during import
« Reply #2 on: September 27, 2021, 12:04:05 pm »
Thanks. Is there any estimated time to get the issue resolved.