开发者

Import Excel spreadsheet into PostgreSQL

开发者 https://www.devze.com 2022-12-09 23:31 出处:网络
I need to be able to import an Excel spreadsheet int开发者_JAVA技巧o a PostgreSQL database. The goal is for use with a Rails application. I have looked at the Roo gem and it takes 16 seconds to conver

I need to be able to import an Excel spreadsheet int开发者_JAVA技巧o a PostgreSQL database. The goal is for use with a Rails application. I have looked at the Roo gem and it takes 16 seconds to convert a 2000 line XLS file to CSV which is unacceptable. So I was wondering if I could just short-circuit the Rails application and import directly into PostgreSQL.

Is there a way to import data from an Excel spreadsheet directly into PostgreSQL?


No, PostgreSQL does not read the XLS file format (nor the XLSX format). You can import from CSV, and in some cases from XML, but that's all (without external preprocessing).

However, if you actually have access to Excel, you can always just export it in an open format (preferrably CSV) directly from inside Excel.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号