0

What's the best way to switch to a database management software from LibreOffice Calc?

I would like to move everything from a master spreadsheet to a database with certain conditions. Is it possible to write a script in Python that would do all of this for me?

The data I have is well structured I have about 300 columns of assets and under every asset there is 0 - ~50 filenames. The asset names are uniform as well as the filenames.

Thank you all!

Bence Károly
  • 11
  • 1
  • 2

2 Answers2

1

You can ofcourse use python for this task but it might be an overkill.

The CSV export / import sequence is likely much faster, less error prone and needs less ongoing maintainance (e.g if you change the spreadsheet columns). The sequence is roughly as follows:

  • select the sheet that you want to import into a DB
  • select Files / Save as.. and then text/csv
  • select a column separator that will not interfere with your data (e.g. |)

The import sequence into a database depends on your choice of db but today many IDE's and database GUI environments will automatically import / introspect your CSV file and create the table / insert the data for you. Things to be double check:

  • You may have to indicate that the first row is a header
  • The assigned datatype may need fine tuning if the automated guesses are not optimal
SeriousFun01
  • 321
  • 3
  • 6
0

You can create a python script that will read this spreadsheet row by row and then run insert statements in a database. In fact, would be even better if you save the spreadsheet as CSV for example, if you only need the data there.

Walter_Ritzel
  • 1,387
  • 1
  • 12
  • 16