A client of mine has a ton of data stored in Excel spreadsheets. I''m building a web application for her (backed by a real db of course) and want to import all that data. Is there a library available to read data from Excel? Is there an easy way to upload the spreadsheets and then read the data? Thanks, Ken Kousen -- Kenneth A. Kousen, Ph.D. President Kousen IT, Inc. <http://www.kousenit.com> http://www.kousenit.com <mailto:ken.kousen@kousenit.com> ken.kousen@kousenit.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060116/4eedf848/attachment.html
If you have access to the spreadsheets, the easiest approach is probably to export them to csv and write your own importer to read those csv files. If you''re running ruby on windows, you can also use the win32ole library to read the data directly from excel, though this is more complicated. I''m not aware of any library to directly access excel documents, but if anyone knows different, I''d really like to hear. Tom Ward On 1/16/06, Ken Kousen <ken.kousen@kousenit.com> wrote:> > > > A client of mine has a ton of data stored in Excel spreadsheets. I''m > building a web application for her (backed by a real db of course) and want > to import all that data. Is there a library available to read data from > Excel? Is there an easy way to upload the spreadsheets and then read the > data? > > > > Thanks, > > > > Ken Kousen > > > > -- > > Kenneth A. Kousen, Ph.D. > > President > > Kousen IT, Inc. > > http://www.kousenit.com > > ken.kousen@kousenit.com > > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > >
What DB are you using to back it? If you are using mysql, just export the spreadsheet to CSV and use the mysqlimport command to pull the data into the DB. -Will On 1/16/06, Tom Ward <tom@popdog.net> wrote:> > If you have access to the spreadsheets, the easiest approach is > probably to export them to csv and write your own importer to read > those csv files. If you''re running ruby on windows, you can also use > the win32ole library to read the data directly from excel, though this > is more complicated. I''m not aware of any library to directly access > excel documents, but if anyone knows different, I''d really like to > hear. > > Tom Ward > > On 1/16/06, Ken Kousen <ken.kousen@kousenit.com> wrote: > > > > > > > > A client of mine has a ton of data stored in Excel spreadsheets. I''m > > building a web application for her (backed by a real db of course) and > want > > to import all that data. Is there a library available to read data from > > Excel? Is there an easy way to upload the spreadsheets and then read > the > > data? > > > > > > > > Thanks, > > > > > > > > Ken Kousen > > > > > > > > -- > > > > Kenneth A. Kousen, Ph.D. > > > > President > > > > Kousen IT, Inc. > > > > http://www.kousenit.com > > > > ken.kousen@kousenit.com > > > > > > _______________________________________________ > > Rails mailing list > > Rails@lists.rubyonrails.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060116/7fbaf339/attachment.html
On 1/16/06, Ken Kousen <ken.kousen@kousenit.com> wrote:> > A client of mine has a ton of data stored in Excel spreadsheets. I''m > building a web application for her (backed by a real db of course) and want > to import all that data. Is there a library available to read data from > Excel? Is there an easy way to upload the spreadsheets and then read the > data? > > > > Thanks, > > > > Ken Kousen > > > > -- > > *Kenneth A. Kousen, Ph.D.* > > President > > *Kousen IT, Inc.* > > http://www.kousenit.com > > ken.kousen@kousenit.com > > > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > >Excel has really good support for XML as well, so exporting to that format may be an option. -- Larry Wright http://www.approachingnormal.com http://www.welcometoparenthood.com <http://www.approachingnormal.com> -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060116/5c028ad4/attachment-0001.html
I thought of exporting the data to CSV format and I may still do that. The problem is that the data is highly structured - it''s not just a couple of simple tables; specific cells have specific pieces of data in them in addition to the tables. And yes, I''m using MySQL, so mysqlimport sounds very helpful. Is there some way to do the export to CSV programmatically? Otherwise this is going to be very labor intensive. Thanks for the help, Ken Kousen -- Kenneth A. Kousen, Ph.D. President Kousen IT, Inc. http://www.kousenit.com ken.kousen@kousenit.com _____ From: rails-bounces@lists.rubyonrails.org [mailto:rails-bounces@lists.rubyonrails.org] On Behalf Of Will Briggs Sent: Monday, January 16, 2006 10:26 AM To: rails@lists.rubyonrails.org Subject: Re: [Rails] Read data from Excel What DB are you using to back it? If you are using mysql, just export the spreadsheet to CSV and use the mysqlimport command to pull the data into the DB. -Will On 1/16/06, Tom Ward <tom@popdog.net> wrote: If you have access to the spreadsheets, the easiest approach is probably to export them to csv and write your own importer to read those csv files. If you''re running ruby on windows, you can also use the win32ole library to read the data directly from excel, though this is more complicated. I''m not aware of any library to directly access excel documents, but if anyone knows different, I''d really like to hear. Tom Ward On 1/16/06, Ken Kousen <ken.kousen@kousenit.com> wrote:> > > > A client of mine has a ton of data stored in Excel spreadsheets. I''m > building a web application for her (backed by a real db of course) andwant> to import all that data. Is there a library available to read data from > Excel? Is there an easy way to upload the spreadsheets and then read the > data? > > > > Thanks, > > > > Ken Kousen > > > > -- > > Kenneth A. Kousen, Ph.D. > > President > > Kousen IT, Inc. > > http://www.kousenit.com > > . ken.kousen@kousenit.com <mailto:ken.kousen@kousenitcom> > > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > >_______________________________________________ Rails mailing list Rails@lists.rubyonrails.org <mailto:Rails@lists.rubyonrails.org> http://lists.rubyonrails.org/mailman/listinfo/rails -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060116/3e6cfa08/attachment-0001.html
If you work on Windows you can use the win32ole implementation: http://www.rubygarden.org/ruby?ScriptingExcel You''ll also find an introduction in the "Programming Ruby" Book. Otherwise your client could save the excel sheets as csv. derkaan> A client of mine has a ton of data stored in Excel spreadsheets. I''m > building a web application for her (backed by a real db of course) andwant> to import all that data. Is there a library available to read data from > Excel? Is there an easy way to upload the spreadsheets and then read the > data?-- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.371 / Virus Database: 267.14.18/230 - Release Date: 14.01.2006
On 1/16/06, Ken Kousen <ken.kousen@kousenit.com> wrote:> > I thought of exporting the data to CSV format and I may still do that. > The problem is that the data is highly structured ? it''s not just a couple > of simple tables; specific cells have specific pieces of data in them in > addition to the tables. > > > > And yes, I''m using MySQL, so mysqlimport sounds very helpful. > > > > Is there some way to do the export to CSV programmatically? Otherwise > this is going to be very labor intensive. > > > > Thanks for the help, > > > > Ken Kousen > > > > -- > > *Kenneth A. Kousen, Ph.D.* > > President > > *Kousen IT, Inc.* > > http://www.kousenit.com > > ken.kousen@kousenit.com > ------------------------------ >What I''m suggesting will certainly sound like nails on a chalkboard to most people on this list, but here goes anyway: If it''s highly structured, but consistently formatted, you may want to consider writing some VBScript (gasp!) to extract the data. -- Larry Wright http://www.approachingnormal.com http://www.welcometoparenthood.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060116/d4f4e945/attachment.html
It is only labor intensive once though....I had to do this exact same thing, and while it took time to get all the data extracted, lined up properly, and inserted, you never look back. - Nic. On 1/16/06, Larry Wright <larrywright@gmail.com> wrote:> > On 1/16/06, Ken Kousen <ken.kousen@kousenit.com> wrote: > > > > > > > > I thought of exporting the data to CSV format and I may still do that. > The problem is that the data is highly structured ? it''s not just a couple > of simple tables; specific cells have specific pieces of data in them in > addition to the tables. > > > > > > > > And yes, I''m using MySQL, so mysqlimport sounds very helpful. > > > > > > > > Is there some way to do the export to CSV programmatically? Otherwise > this is going to be very labor intensive. > > > > > > > > Thanks for the help, > > > > > > > > Ken Kousen > > > > > > > > > > -- > > > > Kenneth A. Kousen, Ph.D. > > > > President > > > > Kousen IT, Inc. > > > > http://www.kousenit.com > > > > ken.kousen@kousenit.com > > > > ________________________________ > > What I''m suggesting will certainly sound like nails on a chalkboard to most > people on this list, but here goes anyway: If it''s highly structured, but > consistently formatted, you may want to consider writing some VBScript > (gasp!) to extract the data. > > > > -- > Larry Wright > http://www.approachingnormal.com > http://www.welcometoparenthood.com > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > >-- - Nic
For a project I worked on last year, we were given spreadsheets of legacy data by the client. We used them to generate their own data load scripts by writing spreadsheet formulas to concatenate the values of certain columns into the correct sql syntax in another column. Then you just copy an entire column of generated inserts into a text file. We used open office since not everyone had a license for excel and we found a) there are some syntax differences between excel''s forumlas and those of open office, and b) open office gets very slow and unstable when you start apply complicated concatenation formulas across mulitple worksheets and thousands of rows! :-) By the end, my co-worker who did the biggest data sets swore that he''d use perl next time... and well, we all know that anything perl can do ruby can do better. :-) b PS: also, open office can open most any excel file and save it as an open office spreadsheet file... which is... (drumroll) a zipped up collection of xml files! So, you could unzip the oo spreadsheet and get to work with ruby or xslt or whatever. (I''ve heard that MS'' latest version of office is supposed to use xml-based file formats, but don''t know if that''s out or what version you''re using...) Nic Werner wrote:> It is only labor intensive once though....I had to do this exact same > thing, and while it took time to get all the data extracted, lined up > properly, and inserted, you never look back. > > - Nic. > > > On 1/16/06, Larry Wright <larrywright@gmail.com> wrote: > >>On 1/16/06, Ken Kousen <ken.kousen@kousenit.com> wrote: >> >>> >>> >>>I thought of exporting the data to CSV format and I may still do that. >> >>The problem is that the data is highly structured ? it''s not just a couple >>of simple tables; specific cells have specific pieces of data in them in >>addition to the tables. >> >>> >>> >>>And yes, I''m using MySQL, so mysqlimport sounds very helpful. >>> >>> >>> >>>Is there some way to do the export to CSV programmatically? Otherwise >> >>this is going to be very labor intensive. >> >>> >>> >>>Thanks for the help, >>> >>> >>> >>>Ken Kousen >>> >>> >>> >>> >>>-- >>> >>>Kenneth A. Kousen, Ph.D. >>> >>>President >>> >>>Kousen IT, Inc. >>> >>>http://www.kousenit.com >>> >>>ken.kousen@kousenit.com >>> >>>________________________________ >> >>What I''m suggesting will certainly sound like nails on a chalkboard to most >>people on this list, but here goes anyway: If it''s highly structured, but >>consistently formatted, you may want to consider writing some VBScript >>(gasp!) to extract the data. >> >> >> >>-- >>Larry Wright >>http://www.approachingnormal.com >>http://www.welcometoparenthood.com >>_______________________________________________ >>Rails mailing list >>Rails@lists.rubyonrails.org >>http://lists.rubyonrails.org/mailman/listinfo/rails >> >> >> > > > > -- > - Nic > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails
On Jan 16, 2006, at 6:46 AM, Ken Kousen wrote:> A client of mine has a ton of data stored in Excel spreadsheets. > I?m building a web application for her (backed by a real db of > course) and want to import all that data. Is there a library > available to read data from Excel? Is there an easy way to upload > the spreadsheets and then read the data? >Not the best approach, but the most convenient for me: install the Spreadsheet::ParseExcel <http://search.cpan.org/~kwitknr/Spreadsheet- ParseExcel-0.2603/> module from CPAN, and use a Perl script to transform the Excel data to delimited text. Scott
Ken Kousen wrote:> A client of mine has a ton of data stored in Excel spreadsheets. I''m > building a web application for her (backed by a real db of course) and > want > to import all that data. Is there a library available to read data from > Excel? Is there an easy way to upload the spreadsheets and then read > the > data? >The easiest way to go about this is using the OLE DB driver in windows to extract the data trough SQL. Another way would be windows automation to save the data in the worksheets / export the files to xml. Both require a windows platform though. -- Posted via http://www.ruby-forum.com/.
Hi a bit late maybe, but have a look at this which I just discovered (not tested yet) : the poi ruby bindings ( http://jakarta.apache.org/poi/poi-ruby.html) ========== The POI library can now be compiled as a Ruby extension, allowing the API to be called from Ruby language programs. Ruby users can therefore read and write OLE2 documents, such as Excel files with ease The bindings are generated by compiling POI with gcj<http://gcc.gnu.org/java/>, and generating the Ruby wrapper using SWIG <http://www.swig.org/>. The aim is the keep the POI api as-is. However, where java standard library objects are used, an effort is made to transform them smoothly into Ruby objects. Therefore, where the POI API takes an OutputStream, you can pass an IO object. Where the POI works java.util.Date or java.util.Calendar object, you can work with a Ruby Time object. ========== Thibaut -- [blog] http://www.dotnetguru2.org/tbarrere On 18/01/06, Mischa Kroon <mischa.kroon@gmail.com> wrote:> > Ken Kousen wrote: > > A client of mine has a ton of data stored in Excel spreadsheets. I''m > > building a web application for her (backed by a real db of course) and > > want > > to import all that data. Is there a library available to read data from > > Excel? Is there an easy way to upload the spreadsheets and then read > > the > > data? > > > > The easiest way to go about this is using the OLE DB driver in windows > to extract the data trough SQL. > > Another way would be windows automation to save the data in the > worksheets / export the files to xml. > > Both require a windows platform though. > > > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060119/a18e9871/attachment.html
Hi. I have used win32ole several times for exctracting data from Excel. If you under Win try this way. It is very easy to use. Only problem that it does not work properly with Non-ASCII symbols. Bug present in 1.8.2 and reported that it fixed in 1.8.4 On 1/19/06, Thibaut Barr?re <thibaut.barrere@gmail.com> wrote:> > Hi > > a bit late maybe, but have a look at this which I just discovered (not > tested yet) : the poi ruby bindings ( > http://jakarta.apache.org/poi/poi-ruby.html) > > ==========> > The POI library can now be compiled as a Ruby extension, allowing the API > to be called from Ruby language programs. Ruby users can therefore read and > write OLE2 documents, such as Excel files with ease > > The bindings are generated by compiling POI with gcj<http://gcc.gnu.org/java/>, > and generating the Ruby wrapper using SWIG <http://www.swig.org/>. The aim > is the keep the POI api as-is. However, where java standard library objects > are used, an effort is made to transform them smoothly into Ruby objects. > Therefore, where the POI API takes an OutputStream, you can pass an IO > object. Where the POI works java.util.Date or java.util.Calendar object, > you can work with a Ruby Time object. > ==========> > > Thibaut > -- > [blog] http://www.dotnetguru2.org/tbarrere > > On 18/01/06, Mischa Kroon <mischa.kroon@gmail.com> wrote: > > > > Ken Kousen wrote: > > > A client of mine has a ton of data stored in Excel spreadsheets. I''m > > > building a web application for her (backed by a real db of course) and > > > want > > > to import all that data. Is there a library available to read data > > from > > > Excel? Is there an easy way to upload the spreadsheets and then read > > > the > > > data? > > > > > > > The easiest way to go about this is using the OLE DB driver in windows > > to extract the data trough SQL. > > > > Another way would be windows automation to save the data in the > > worksheets / export the files to xml. > > > > Both require a windows platform though. > > > > > > > > -- > > Posted via http://www.ruby-forum.com/. > > _______________________________________________ > > Rails mailing list > > Rails@lists.rubyonrails.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > >-- anatol (http://pomozov.info) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060119/b5ef9549/attachment.html
Interesting. Before I started digging into RoR, I was planning to do this project in Java and had looked at the POI library with that in mind. Now that there?s a port to Ruby, maybe it?ll all work out. Thanks, Ken -- Kenneth A. Kousen, Ph.D. President Kousen IT, Inc. http://www.kousenit.com ken.kousen@kousenit.com _____ From: rails-bounces@lists.rubyonrails.org [mailto:rails-bounces@lists.rubyonrails.org] On Behalf Of Thibaut Barr?re Sent: Thursday, January 19, 2006 7:25 AM To: rails@lists.rubyonrails.org Subject: Re: [Rails] Re: Read data from Excel Hi a bit late maybe, but have a look at this which I just discovered (not tested yet) : the poi ruby bindings (http://jakarta.apache.org/poi/poi-ruby.html) ========== The POI library can now be compiled as a Ruby extension, allowing the API to be called from Ruby language programs. Ruby users can therefore read and write OLE2 documents, such as Excel files with ease The bindings are generated by compiling POI with gcj <http://gcc.gnu.org/java/> , and generating the Ruby wrapper using SWIG <http://www.swig.org/> . The aim is the keep the POI api as-is. However, where java standard library objects are used, an effort is made to transform them smoothly into Ruby objects. Therefore, where the POI API takes an OutputStream, you can pass an IO object. Where the POI works java.util.Date or java.util.Calendar object, you can work with a Ruby Time object. ========== Thibaut -- [blog] http://www.dotnetguru2.org/tbarrere On 18/01/06, Mischa Kroon <mischa.kroon@gmail.com> wrote: Ken Kousen wrote:> A client of mine has a ton of data stored in Excel spreadsheets. I''m > building a web application for her (backed by a real db of course) and > want > to import all that data. Is there a library available to read data from > Excel? Is there an easy way to upload the spreadsheets and then read > the > data? >The easiest way to go about this is using the OLE DB driver in windows to extract the data trough SQL. Another way would be windows automation to save the data in the worksheets / export the files to xml. Both require a windows platform though. -- Posted via http://www.ruby-forum.com/. _______________________________________________ Rails mailing list Rails@lists.rubyonrails.org . <http://lists.rubyonrailsorg/mailman/listinfo/rails> http://lists.rubyonrails.org/mailman/listinfo/rails -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060119/af42c174/attachment-0001.html
Interesting. Before I started digging into RoR, I was planning to do this project in Java and had looked at the POI library with that in mind. Now that there?s a port to Ruby, maybe it?ll all work out. Thanks, Ken -- Kenneth A. Kousen, Ph.D. President Kousen IT, Inc. http://www.kousenit.com ken.kousen@kousenit.com _____ From: rails-bounces@lists.rubyonrails.org [mailto:rails-bounces@lists.rubyonrails.org] On Behalf Of Thibaut Barr?re Sent: Thursday, January 19, 2006 7:25 AM To: rails@lists.rubyonrails.org Subject: Re: [Rails] Re: Read data from Excel Hi a bit late maybe, but have a look at this which I just discovered (not tested yet) : the poi ruby bindings (http://jakarta.apache.org/poi/poi-ruby.html) ========== The POI library can now be compiled as a Ruby extension, allowing the API to be called from Ruby language programs. Ruby users can therefore read and write OLE2 documents, such as Excel files with ease The bindings are generated by compiling POI with gcj <http://gcc.gnu.org/java/> , and generating the Ruby wrapper using SWIG <http://www.swig.org/> . The aim is the keep the POI api as-is. However, where java standard library objects are used, an effort is made to transform them smoothly into Ruby objects. Therefore, where the POI API takes an OutputStream, you can pass an IO object. Where the POI works java.util.Date or java.util.Calendar object, you can work with a Ruby Time object. ========== Thibaut -- [blog] http://www.dotnetguru2.org/tbarrere On 18/01/06, Mischa Kroon <mischa.kroon@gmail.com> wrote: Ken Kousen wrote:> A client of mine has a ton of data stored in Excel spreadsheets. I''m > building a web application for her (backed by a real db of course) and > want > to import all that data. Is there a library available to read data from > Excel? Is there an easy way to upload the spreadsheets and then read > the > data? >The easiest way to go about this is using the OLE DB driver in windows to extract the data trough SQL. Another way would be windows automation to save the data in the worksheets / export the files to xml. Both require a windows platform though. -- Posted via http://www.ruby-forum.com/. _______________________________________________ Rails mailing list Rails@lists.rubyonrails.org . <http://lists.rubyonrailsorg/mailman/listinfo/rails> http://lists.rubyonrails.org/mailman/listinfo/rails -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060119/c456822f/attachment-0001.html
Interesting. Before I started digging into RoR, I was planning to do this project in Java and had looked at the POI library with that in mind. Now that there?s a port to Ruby, maybe it?ll all work out. Thanks, Ken -- Kenneth A. Kousen, Ph.D. President Kousen IT, Inc. http://www.kousenit.com ken.kousen@kousenit.com _____ From: rails-bounces@lists.rubyonrails.org [mailto:rails-bounces@lists.rubyonrails.org] On Behalf Of Thibaut Barr?re Sent: Thursday, January 19, 2006 7:25 AM To: rails@lists.rubyonrails.org Subject: Re: [Rails] Re: Read data from Excel Hi a bit late maybe, but have a look at this which I just discovered (not tested yet) : the poi ruby bindings (http://jakarta.apache.org/poi/poi-ruby.html) ========== The POI library can now be compiled as a Ruby extension, allowing the API to be called from Ruby language programs. Ruby users can therefore read and write OLE2 documents, such as Excel files with ease The bindings are generated by compiling POI with gcj <http://gcc.gnu.org/java/> , and generating the Ruby wrapper using SWIG <http://www.swig.org/> . The aim is the keep the POI api as-is. However, where java standard library objects are used, an effort is made to transform them smoothly into Ruby objects. Therefore, where the POI API takes an OutputStream, you can pass an IO object. Where the POI works java.util.Date or java.util.Calendar object, you can work with a Ruby Time object. ========== Thibaut -- [blog] http://www.dotnetguru2.org/tbarrere On 18/01/06, Mischa Kroon <mischa.kroon@gmail.com> wrote: Ken Kousen wrote:> A client of mine has a ton of data stored in Excel spreadsheets. I''m > building a web application for her (backed by a real db of course) and > want > to import all that data. Is there a library available to read data from > Excel? Is there an easy way to upload the spreadsheets and then read > the > data? >The easiest way to go about this is using the OLE DB driver in windows to extract the data trough SQL. Another way would be windows automation to save the data in the worksheets / export the files to xml. Both require a windows platform though. -- Posted via http://www.ruby-forum.com/. _______________________________________________ Rails mailing list Rails@lists.rubyonrails.org . <http://lists.rubyonrailsorg/mailman/listinfo/rails> http://lists.rubyonrails.org/mailman/listinfo/rails -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060119/e7e06458/attachment-0001.html
Interesting. Before I started digging into RoR, I was planning to do this project in Java and had looked at the POI library with that in mind. Now that there?s a port to Ruby, maybe it?ll all work out. Thanks, Ken -- Kenneth A. Kousen, Ph.D. President Kousen IT, Inc. http://www.kousenit.com ken.kousen@kousenit.com _____ From: rails-bounces@lists.rubyonrails.org [mailto:rails-bounces@lists.rubyonrails.org] On Behalf Of Thibaut Barr?re Sent: Thursday, January 19, 2006 7:25 AM To: rails@lists.rubyonrails.org Subject: Re: [Rails] Re: Read data from Excel Hi a bit late maybe, but have a look at this which I just discovered (not tested yet) : the poi ruby bindings (http://jakarta.apache.org/poi/poi-ruby.html) ========== The POI library can now be compiled as a Ruby extension, allowing the API to be called from Ruby language programs. Ruby users can therefore read and write OLE2 documents, such as Excel files with ease The bindings are generated by compiling POI with gcj <http://gcc.gnu.org/java/> , and generating the Ruby wrapper using SWIG <http://www.swig.org/> . The aim is the keep the POI api as-is. However, where java standard library objects are used, an effort is made to transform them smoothly into Ruby objects. Therefore, where the POI API takes an OutputStream, you can pass an IO object. Where the POI works java.util.Date or java.util.Calendar object, you can work with a Ruby Time object. ========== Thibaut -- [blog] http://www.dotnetguru2.org/tbarrere On 18/01/06, Mischa Kroon <mischa.kroon@gmail.com> wrote: Ken Kousen wrote:> A client of mine has a ton of data stored in Excel spreadsheets. I''m > building a web application for her (backed by a real db of course) and > want > to import all that data. Is there a library available to read data from > Excel? Is there an easy way to upload the spreadsheets and then read > the > data? >The easiest way to go about this is using the OLE DB driver in windows to extract the data trough SQL. Another way would be windows automation to save the data in the worksheets / export the files to xml. Both require a windows platform though. -- Posted via http://www.ruby-forum.com/. _______________________________________________ Rails mailing list Rails@lists.rubyonrails.org . <http://lists.rubyonrailsorg/mailman/listinfo/rails> http://lists.rubyonrails.org/mailman/listinfo/rails -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060119/4d6afae9/attachment.html
Interesting. Before I started digging into RoR, I was planning to do this project in Java and had looked at the POI library with that in mind. Now that there?s a port to Ruby, maybe it?ll all work out. Thanks, Ken -- Kenneth A. Kousen, Ph.D. President Kousen IT, Inc. http://www.kousenit.com ken.kousen@kousenit.com _____ From: rails-bounces@lists.rubyonrails.org [mailto:rails-bounces@lists.rubyonrails.org] On Behalf Of Thibaut Barr?re Sent: Thursday, January 19, 2006 7:25 AM To: rails@lists.rubyonrails.org Subject: Re: [Rails] Re: Read data from Excel Hi a bit late maybe, but have a look at this which I just discovered (not tested yet) : the poi ruby bindings (http://jakarta.apache.org/poi/poi-ruby.html) ========== The POI library can now be compiled as a Ruby extension, allowing the API to be called from Ruby language programs. Ruby users can therefore read and write OLE2 documents, such as Excel files with ease The bindings are generated by compiling POI with gcj <http://gcc.gnu.org/java/> , and generating the Ruby wrapper using SWIG <http://www.swig.org/> . The aim is the keep the POI api as-is. However, where java standard library objects are used, an effort is made to transform them smoothly into Ruby objects. Therefore, where the POI API takes an OutputStream, you can pass an IO object. Where the POI works java.util.Date or java.util.Calendar object, you can work with a Ruby Time object. ========== Thibaut -- [blog] http://www.dotnetguru2.org/tbarrere On 18/01/06, Mischa Kroon <mischa.kroon@gmail.com> wrote: Ken Kousen wrote:> A client of mine has a ton of data stored in Excel spreadsheets. I''m > building a web application for her (backed by a real db of course) and > want > to import all that data. Is there a library available to read data from > Excel? Is there an easy way to upload the spreadsheets and then read > the > data? >The easiest way to go about this is using the OLE DB driver in windows to extract the data trough SQL. Another way would be windows automation to save the data in the worksheets / export the files to xml. Both require a windows platform though. -- Posted via http://www.ruby-forum.com/. _______________________________________________ Rails mailing list Rails@lists.rubyonrails.org . <http://lists.rubyonrailsorg/mailman/listinfo/rails> http://lists.rubyonrails.org/mailman/listinfo/rails -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060119/de832edc/attachment.html
Interesting. Before I started digging into RoR, I was planning to do this project in Java and had looked at the POI library with that in mind. Now that there?s a port to Ruby, maybe it?ll all work out. Thanks, Ken -- Kenneth A. Kousen, Ph.D. President Kousen IT, Inc. http://www.kousenit.com ken.kousen@kousenit.com _____ From: rails-bounces@lists.rubyonrails.org [mailto:rails-bounces@lists.rubyonrails.org] On Behalf Of Thibaut Barr?re Sent: Thursday, January 19, 2006 7:25 AM To: rails@lists.rubyonrails.org Subject: Re: [Rails] Re: Read data from Excel Hi a bit late maybe, but have a look at this which I just discovered (not tested yet) : the poi ruby bindings (http://jakarta.apache.org/poi/poi-ruby.html) ========== The POI library can now be compiled as a Ruby extension, allowing the API to be called from Ruby language programs. Ruby users can therefore read and write OLE2 documents, such as Excel files with ease The bindings are generated by compiling POI with gcj <http://gcc.gnu.org/java/> , and generating the Ruby wrapper using SWIG <http://www.swig.org/> . The aim is the keep the POI api as-is. However, where java standard library objects are used, an effort is made to transform them smoothly into Ruby objects. Therefore, where the POI API takes an OutputStream, you can pass an IO object. Where the POI works java.util.Date or java.util.Calendar object, you can work with a Ruby Time object. ========== Thibaut -- [blog] http://www.dotnetguru2.org/tbarrere On 18/01/06, Mischa Kroon <mischa.kroon@gmail.com> wrote: Ken Kousen wrote:> A client of mine has a ton of data stored in Excel spreadsheets. I''m > building a web application for her (backed by a real db of course) and > want > to import all that data. Is there a library available to read data from > Excel? Is there an easy way to upload the spreadsheets and then read > the > data? >The easiest way to go about this is using the OLE DB driver in windows to extract the data trough SQL. Another way would be windows automation to save the data in the worksheets / export the files to xml. Both require a windows platform though. -- Posted via http://www.ruby-forum.com/. _______________________________________________ Rails mailing list Rails@lists.rubyonrails.org . <http://lists.rubyonrailsorg/mailman/listinfo/rails> http://lists.rubyonrails.org/mailman/listinfo/rails -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060119/53186f5a/attachment-0001.html
Interesting. Before I started digging into RoR, I was planning to do this project in Java and had looked at the POI library with that in mind. Now that there?s a port to Ruby, maybe it?ll all work out. Thanks, Ken -- Kenneth A. Kousen, Ph.D. President Kousen IT, Inc. http://www.kousenit.com ken.kousen@kousenit.com _____ From: rails-bounces@lists.rubyonrails.org [mailto:rails-bounces@lists.rubyonrails.org] On Behalf Of Thibaut Barr?re Sent: Thursday, January 19, 2006 7:25 AM To: rails@lists.rubyonrails.org Subject: Re: [Rails] Re: Read data from Excel Hi a bit late maybe, but have a look at this which I just discovered (not tested yet) : the poi ruby bindings (http://jakarta.apache.org/poi/poi-ruby.html) ========== The POI library can now be compiled as a Ruby extension, allowing the API to be called from Ruby language programs. Ruby users can therefore read and write OLE2 documents, such as Excel files with ease The bindings are generated by compiling POI with gcj <http://gcc.gnu.org/java/> , and generating the Ruby wrapper using SWIG <http://www.swig.org/> . The aim is the keep the POI api as-is. However, where java standard library objects are used, an effort is made to transform them smoothly into Ruby objects. Therefore, where the POI API takes an OutputStream, you can pass an IO object. Where the POI works java.util.Date or java.util.Calendar object, you can work with a Ruby Time object. ========== Thibaut -- [blog] http://www.dotnetguru2.org/tbarrere On 18/01/06, Mischa Kroon <mischa.kroon@gmail.com> wrote: Ken Kousen wrote:> A client of mine has a ton of data stored in Excel spreadsheets. I''m > building a web application for her (backed by a real db of course) and > want > to import all that data. Is there a library available to read data from > Excel? Is there an easy way to upload the spreadsheets and then read > the > data? >The easiest way to go about this is using the OLE DB driver in windows to extract the data trough SQL. Another way would be windows automation to save the data in the worksheets / export the files to xml. Both require a windows platform though. -- Posted via http://www.ruby-forum.com/. _______________________________________________ Rails mailing list Rails@lists.rubyonrails.org . <http://lists.rubyonrailsorg/mailman/listinfo/rails> http://lists.rubyonrails.org/mailman/listinfo/rails -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060119/1f0454a7/attachment.html
Interesting. Before I started digging into RoR, I was planning to do this project in Java and had looked at the POI library with that in mind. Now that there?s a port to Ruby, maybe it?ll all work out. Thanks, Ken -- Kenneth A. Kousen, Ph.D. President Kousen IT, Inc. http://www.kousenit.com ken.kousen@kousenit.com _____ From: rails-bounces@lists.rubyonrails.org [mailto:rails-bounces@lists.rubyonrails.org] On Behalf Of Thibaut Barr?re Sent: Thursday, January 19, 2006 7:25 AM To: rails@lists.rubyonrails.org Subject: Re: [Rails] Re: Read data from Excel Hi a bit late maybe, but have a look at this which I just discovered (not tested yet) : the poi ruby bindings (http://jakarta.apache.org/poi/poi-ruby.html) ========== The POI library can now be compiled as a Ruby extension, allowing the API to be called from Ruby language programs. Ruby users can therefore read and write OLE2 documents, such as Excel files with ease The bindings are generated by compiling POI with gcj <http://gcc.gnu.org/java/> , and generating the Ruby wrapper using SWIG <http://www.swig.org/> . The aim is the keep the POI api as-is. However, where java standard library objects are used, an effort is made to transform them smoothly into Ruby objects. Therefore, where the POI API takes an OutputStream, you can pass an IO object. Where the POI works java.util.Date or java.util.Calendar object, you can work with a Ruby Time object. ========== Thibaut -- [blog] http://www.dotnetguru2.org/tbarrere On 18/01/06, Mischa Kroon <mischa.kroon@gmail.com> wrote: Ken Kousen wrote:> A client of mine has a ton of data stored in Excel spreadsheets. I''m > building a web application for her (backed by a real db of course) and > want > to import all that data. Is there a library available to read data from > Excel? Is there an easy way to upload the spreadsheets and then read > the > data? >The easiest way to go about this is using the OLE DB driver in windows to extract the data trough SQL. Another way would be windows automation to save the data in the worksheets / export the files to xml. Both require a windows platform though. -- Posted via http://www.ruby-forum.com/. _______________________________________________ Rails mailing list Rails@lists.rubyonrails.org . <http://lists.rubyonrailsorg/mailman/listinfo/rails> http://lists.rubyonrails.org/mailman/listinfo/rails -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060119/dac0bfa3/attachment-0001.html
Sorry about the multiple posts everybody. My email was acting very flaky yesterday. I could blame Outlook, but I?ll just do what I normally do and blame Bill Gates directly. Sigh, Ken Kousen -- Kenneth A. Kousen, Ph.D. President Kousen IT, Inc. http://www.kousenit.com ken.kousen@kousenit.com _____ From: rails-bounces@lists.rubyonrails.org [mailto:rails-bounces@lists.rubyonrails.org] On Behalf Of Ken Kousen Sent: Thursday, January 19, 2006 5:05 PM To: rails@lists.rubyonrails.org Subject: RE: [Rails] Re: Read data from Excel Interesting. Before I started digging into RoR, I was planning to do this project in Java and had looked at the POI library with that in mind. Now that there?s a port to Ruby, maybe it?ll all work out. Thanks, Ken -- Kenneth A. Kousen, Ph.D. President Kousen IT, Inc. http://www.kousenit.com ken.kousen@kousenit.com _____ From: rails-bounces@lists.rubyonrails.org [mailto:rails-bounces@lists.rubyonrails.org] On Behalf Of Thibaut Barr?re Sent: Thursday, January 19, 2006 7:25 AM To: rails@lists.rubyonrails.org Subject: Re: [Rails] Re: Read data from Excel Hi a bit late maybe, but have a look at this which I just discovered (not tested yet) : the poi ruby bindings (http://jakarta.apache.org/poi/poi-ruby.html) ========== The POI library can now be compiled as a Ruby extension, allowing the API to be called from Ruby language programs. Ruby users can therefore read and write OLE2 documents, such as Excel files with ease The bindings are generated by compiling POI with gcj <http://gcc.gnu.org/java/> , and generating the Ruby wrapper using SWIG <http://www.swig.org/> . The aim is the keep the POI api as-is. However, where java standard library objects are used, an effort is made to transform them smoothly into Ruby objects. Therefore, where the POI API takes an OutputStream, you can pass an IO object. Where the POI works java.util.Date or java.util.Calendar object, you can work with a Ruby Time object. ========== Thibaut -- [blog] http://www.dotnetguru2.org/tbarrere On 18/01/06, Mischa Kroon <mischa.kroon@gmail.com> wrote: Ken Kousen wrote:> A client of mine has a ton of data stored in Excel spreadsheets. I''m > building a web application for her (backed by a real db of course) and > want > to import all that data. Is there a library available to read data from > Excel? Is there an easy way to upload the spreadsheets and then read > the > data? >The easiest way to go about this is using the OLE DB driver in windows to extract the data trough SQL. Another way would be windows automation to save the data in the worksheets / export the files to xml. Both require a windows platform though. -- Posted via http://www.ruby-forum.com/. _______________________________________________ Rails mailing list Rails@lists.rubyonrails.org . <http://lists.rubyonrailsorg/mailman/listinfo/rails> http://lists.rubyonrails.org/mailman/listinfo/rails -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060120/630e69e2/attachment.html
Sorry about the multiple posts everybody. My email was acting very flaky yesterday. I could blame Outlook, but I?ll just do what I normally do and blame Bill Gates directly. Sigh, Ken Kousen -- Kenneth A. Kousen, Ph.D. President Kousen IT, Inc. http://www.kousenit.com ken.kousen@kousenit.com _____ From: rails-bounces@lists.rubyonrails.org [mailto:rails-bounces@lists.rubyonrails.org] On Behalf Of Ken Kousen Sent: Thursday, January 19, 2006 5:05 PM To: rails@lists.rubyonrails.org Subject: RE: [Rails] Re: Read data from Excel Interesting. Before I started digging into RoR, I was planning to do this project in Java and had looked at the POI library with that in mind. Now that there?s a port to Ruby, maybe it?ll all work out. Thanks, Ken -- Kenneth A. Kousen, Ph.D. President Kousen IT, Inc. http://www.kousenit.com ken.kousen@kousenit.com _____ From: rails-bounces@lists.rubyonrails.org [mailto:rails-bounces@lists.rubyonrails.org] On Behalf Of Thibaut Barr?re Sent: Thursday, January 19, 2006 7:25 AM To: rails@lists.rubyonrails.org Subject: Re: [Rails] Re: Read data from Excel Hi a bit late maybe, but have a look at this which I just discovered (not tested yet) : the poi ruby bindings (http://jakarta.apache.org/poi/poi-ruby.html) ========== The POI library can now be compiled as a Ruby extension, allowing the API to be called from Ruby language programs. Ruby users can therefore read and write OLE2 documents, such as Excel files with ease The bindings are generated by compiling POI with gcj <http://gcc.gnu.org/java/> , and generating the Ruby wrapper using SWIG <http://www.swig.org/> . The aim is the keep the POI api as-is. However, where java standard library objects are used, an effort is made to transform them smoothly into Ruby objects. Therefore, where the POI API takes an OutputStream, you can pass an IO object. Where the POI works java.util.Date or java.util.Calendar object, you can work with a Ruby Time object. ========== Thibaut -- [blog] http://www.dotnetguru2.org/tbarrere On 18/01/06, Mischa Kroon <mischa.kroon@gmail.com> wrote: Ken Kousen wrote:> A client of mine has a ton of data stored in Excel spreadsheets. I''m > building a web application for her (backed by a real db of course) and > want > to import all that data. Is there a library available to read data from > Excel? Is there an easy way to upload the spreadsheets and then read > the > data? >The easiest way to go about this is using the OLE DB driver in windows to extract the data trough SQL. Another way would be windows automation to save the data in the worksheets / export the files to xml. Both require a windows platform though. -- Posted via http://www.ruby-forum.com/. _______________________________________________ Rails mailing list Rails@lists.rubyonrails.org . <http://lists.rubyonrailsorg/mailman/listinfo/rails> http://lists.rubyonrails.org/mailman/listinfo/rails -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060120/9ad0efba/attachment-0001.html
Hello sir, I am troubling with getting the data from the spreadsheet.i need to retrive the worksheets name and merged cells ranges.the only problem is that i don know about the exact rows and cloumns bez all are dynamic values.i tried with ''roo'',''spreadsheet/excel'' and ''parseexcel/parser'' gems.but i din''t get the solution yet.Could you plz help me.Thanks in advance. Regards, Poornima.D -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---