Shantanu24
Posts: 19
Joined: Fri Dec 30, 2016 6:28 am

Send .ods libre calc file to SQL server

Fri Jan 13, 2017 9:55 am

Is it possible to send an entire Libre Office Calc (.ods) file to the SQL server from Raspberry pi?

I am creating and updating real time a .ods calc file in Raspberry Pi and Python using XLWT and XLRD modules.

I was wondering is it is possible to send this entire .ods (libre office calc) file to the SQL server?

User avatar
topguy
Posts: 6491
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: Send .ods libre calc file to SQL server

Fri Jan 13, 2017 10:20 am

What kind of SQL server ?
The SQL server can probably store the ods file in a binary blob in a table but I have a feeling that is not what you want.

If answer to first question is MySQL then it looks like phpmyadmin has import functionality for ODs files: https://docs.phpmyadmin.net/en/latest/i ... xport.html

User avatar
DougieLawson
Posts: 39121
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Send .ods libre calc file to SQL server

Fri Jan 13, 2017 3:56 pm

Libreoffice has a Java plugin that allows you to access MySQL data as though it's a spreadsheet.

https://packages.debian.org/jessie/libr ... -connector
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

Shantanu24
Posts: 19
Joined: Fri Dec 30, 2016 6:28 am

Re: Send .ods libre calc file to SQL server

Mon Jan 16, 2017 7:06 am

I am doing the processing only on the embedded side. On the RPi. I have no knowledge of MySQL. We have a database engineer for the same.

My Q is,
How do i push a .ods file to a MySQL server? For example, it is very simple to push strings and integers to a HTTP database by just incorporating the variables in the URL.

But when it comes to uploading an entire .ods file to a server, I need some guidance since I have never exported an entire file to any database.

Also, is it my job from the RPi to SEND the .ods file to the server? OR does the MySQL have to PULL the file from my RPi?

User avatar
DougieLawson
Posts: 39121
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Send .ods libre calc file to SQL server

Mon Jan 16, 2017 11:56 am

Sorry nobody knows what you mean by "How do i push a .ods file to a MySQL server?".
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

Shantanu24
Posts: 19
Joined: Fri Dec 30, 2016 6:28 am

Re: Send .ods libre calc file to SQL server

Tue Jan 17, 2017 4:33 am

DougieLawson wrote:Sorry nobody knows what you mean by "How do i push a .ods file to a MySQL server?".
.ods file = Libre Office Calc file.
Push .ods file to mySQL server = Send a whole xyz.ods file to the MySQL server

User avatar
topguy
Posts: 6491
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: Send .ods libre calc file to SQL server

Tue Jan 17, 2017 10:18 am

But is it the "file" you want stored on the server so that another client can get the same file from the DB. OR is it the values in the spreadsheet you want to store in the DB ?

Shantanu24
Posts: 19
Joined: Fri Dec 30, 2016 6:28 am

Re: Send .ods libre calc file to SQL server

Wed Jan 18, 2017 6:29 am

I want to send an Entire file to the DB. So that my another RPi can download that file from the same DB

User avatar
rpdom
Posts: 17173
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Send .ods libre calc file to SQL server

Wed Jan 18, 2017 6:35 am

Well, you can store any data as a "Blob" in MySQL. The type of file is unimportant in that case.

Return to “Beginners”