Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Can LC Designer set up a data connection with Excel 2007 *.xlsx files

Avatar

Level 3

I am not able to set up a data connection in LC Designer with Excel file of 2007 version (ie. *.xlsx).

Just wanna know if it is not supported.

Best Rgds.

5 Replies

Avatar

Level 10

Designer supports ODBC connections so you have to make the Excel spreadsheet look like an ODBC data source.

Paul

Avatar

Level 3

Dear Paul,

Thanks for your respone. I finally work out by installing Excel 2007 and this time it works for my Designer to use the

new ODBC data source on Excel file which include *.xlsx.

But there is something strange for the behavior.

I set Read only access to the Excel file on data connection. Previously using an older version of Excel driver, it behaves

such that whenever I open my pdf, (I first open dc and read data and then close dc immediately) so I can open my Excel file

after that. Also I can edit my Excel file and my pdf can get the updated data on re-connection to the file.

However using the newer version on 2007, it behaves differently. Even after I have completed my work and closed dc in my pdf,

I cannot immediately open Excel file using Excel. It displays a message that the file cannot be open which is unusable or corrupted.

I have to wait for more than 30 seconds before I can open it using Excel again.

Also whenever I update my Excel file, if I do the re-connection again on the pdf, some columns will be read as null this time.

Any idea?

Avatar

Level 10

Are you closing the connection in your code?

xfa.sourceSet.DataConnectionName.close()

If you are then there must be some setting in the driver that is keeping the ocnnection open. Sounds like it is timinmg out after the doc closes and the 30 secs is the timeout value. I do not use Excel as a db (not recommended) as it is not a "real" database.

Maybe someone else who is more familiar with Excel can chime in.

Paul

Avatar

Level 3

Dear Paul,

yes I have close the data connection.

just so the new driver behave a bit strange from the old driver

Rgds

Avatar

Level 10

That is all that we as deseigners can control ....it must be in the driver itself.

Paul