Any quick way to export data from Filemaker? - python

As a user of the database, are there any quicker ways of exporting data from Filemaker using languages like python or java? Perhaps to an Excel.
My job involves exporting selected data constantly from our company's Filemaker database. However, the software is super slow, and the design of our app is bad which makes selecting which data to export a pain. (I have to manually select data one by one by opening the full record of each data. There's no batch export function.)
Please provide me with alternative methods. I feel very stupid in doing this.

i always assume there is an easier way to do it.
having not done it myself, i would try this method:
http://agsci.psu.edu/it/how-to/convert-filemaker-pro-4-data-to-excel-export-as-merge-text-file
Convert FileMaker Pro 4 Data to Excel (Export as Merge Text File)
FileMaker Pro version 4 (FMP4) has the ability to export a text file that can be inserted into Excel 2013 or 2016. Note: Other higher versions of FMP can do this as well. These steps focus on FMP4 specifically.
Note: You should have saved the FileMaker Pro file to a known location on your computer. You will need to locate it with Excel.
Open the FileMaker file. Find the records you wish to export to Excel.
From the File menu choose Import/Export then Export Records.
From the Save as type box choose Merge (*.MER).
In the File name box, enter a name for the exported file. Be sure to add the .TXT extension rather than .MER.
You can choose to save the file to the desktop or to the same folder as the FileMaker file.
Click Save.
From the left side, double click on the field names you wish to export. Their names will appear on the right side.
Note: Once the names are on the right side, you can re-order them by clicking and holding on the double sided arrows beside their name. Move up or down as needed. This becomes the export order.
Click Export. This wil create the text file to be imported with Excel.
Open a blank or existing Excel 2013 or 2016 spreadsheet.
Click the Data tab on the Ribbon and choose From Text.
Choose the text file you want to import and double click.
This will open the Text Import Wizard. Your data type will be Delimited. Click Next.
For the Delimiter, un-check the Tab box. Then check the Comma box.
The Text qualifier should be a double quote.
Click Finish.
A final window will be displayed asking where you wish to put the data into the sheet. Chose A1.
Click OK.
Your data will now be in Excel.

You can also save records as a spreadsheet for use in Microsoft Excel. For more information, see Saving and sending records as an Excel file in the FileMaker Help file. Use export when you want to export records in the current found set or export in a format other than an Excel spreadsheet. Use Save as Excel when you want to create an Excel spreadsheet that contains all the fields you have access to on the current layout.
If your FileMaker Pro source file contains summary fields, you can group by a sorted field in order to export subsummary values, such as subtotals generated by a report with grouped data. This process exports one record for each group. For example, if you have a report that totals sales by region, you can export one summary value for each region.

Related

openpyxl corrupts spreadsheet if it contains a data source

I use openpyxl to interact with Excel files using Python 3.7. I open and save my .xlsx spreadsheets as follows:
from openpyxl import load_workbook
wb.load_workbook('file.xlsx', read_only=False)
wb.save('file.xlsx')
If file.xlsx contains no links to external data sources (such as SQL Server or Postgre-SQL), then there is no problem with the saved file and it opens okay in Excel after being processed by my Python script.
However, if file.xlsx does contain a link to external data, then upon executing the above script, the output file is now corrupted. When opening the file in Excel, the following error is reported and I have the option of attempting to recover it. When recovering, the data remains but all links to the data source are gone.
> We found a problem with some content in file.xlsx. Do you want us to try to recover as much as we can? If you trust the source of this workbook, click Yes.
It is easy to reproduce this error as follows:
Create a blank spreadsheet and save it as file.xlsx.
Run the above three lines of Python code to open and save the file. You will see this works fine and has no impact on the spreadsheet.
Now open file.xlsx in Excel and, from the Data tab, choose a data source. You can choose any data source (link to a csv file, a table within Excel, or an external data source - it doesn't matter).
Save the spreadsheet, then run the above Python script (which again, simply opens and saves it).
Open file.xlsx in Excel. You will see that it is now corrupted.
My conclusion is that, at the moment, openpyxl doesn't support spreadsheets that contain links to external data. It would be useful to have this confirmed, or for a workaround to the above issue to be proposed.
Thanks!!

Can you use python to access PowerPoint add in functions?

I am creating multiple powerpoint decks that have data modified but I need to be able to hit this "refresh slides" button that accesses the updated data from a connected website. Is there a way to do this automatically in python?
No, there is not. However, there is a workaround:
You have to put your data in single .xslx (Excel) files
Use this data within you PowerPointPresentation (see here for a description)
Write a script to refresh your data and output them into the .xlsx files
If you have done everything correctly, next time you open PowerPoint it will ask you, whether or not it should refresh the tables/graphs.
That is the only work around I have found in order to refresh PowerPointPresentations.

How can I update workbook links when using pd.read_excel()?

The question is pretty simple, actually.
I'm reading an Excel file using Pandas. When I open it using Office's Excel in my Desktop I'm prompted to Enable Content and then Update Links [that is, update values in those cells importing information from cells in other workbooks and xslx files], so it reads other files in some other folders.
While using pd.read_excel('filename') however that option is not available, and I'm afraid it's importing the data previously contained in the spreadsheet without updating it. Is there a workaround?

Is it possible to extract an SSRS report embedded in the body of an email and export to csv?

We currently are receiving reports via email (I believe they are SSRS reports) which are embedded in the email body rather than attached. The reports look like images or snapshots; however, when I copy and paste the "image" of a report into Excel, the column/row format is retained and it pastes into Excel perfectly, with the columns and rows getting pasted into distinct columns and rows accordingly. So it isn't truly an image, as there is a structure to the embedded report.
Right now, someone has to manually copy and paste each report into excel (step 1), then import the report into a table in SQL Server (step 2). There are 8 such reports every day, so the manual copy/pasting from the email into excel is very time consuming.
The question is: is there a way - any way - to automate step 1 so that we don't have to manually copy and paste each report into excel? Is there some way to use python or some other language to detect the format of the reports in the emails, and extract them into .csv or excel files?
I have no code to show as this is more of a question of - is this even possible? And if so, any hints as to how to accomplish it would be greatly appreciated.
The most efficient solution is to have the SSRS administrator (or you, if you have permissions) set the subscription to send as CSV. To change this in SSRS right click the report and then click manage. Select "Subscriptions" on the left and then click edit next to the subscription you want to change. Scroll down to Delivery Options and select CSV in the Render Format dropdown. Viola, you receive your report in the correct format and don't have to do any weird extraction.

How to set formula value in openpyxl

I'm trying to write a simple tool to work on .csv and .xlsx files. The idea is to read in data as .csv add some modifications and export to .xlsx with the modifications added. I've got everything working but when I try to write out to the .xlsx file (using openpyxl in Python) I'm having some trouble. When I open the document in either LibreOffice Calc or Gnumeric some fields aren't showing. The fields I'm having trouble with include formulas. When I click on them the formulas are correctly typed in the field, but nothing is shown in the field. If I retype a character in the formula it's evaluated and the value shows up.
I had a poke around in the underlying .xml of the worksheet and the cells obviously doesn't have a cache. But I also noticed that it didn't always have the right data type. I tried to fix this by explicitly setting the type to formula but no luck.
What I use now to set the cell is:
cell = ws.cell(column=i,row=j)
cell.set_explicit_value(value=val,data_type=cell.TYPE_FORMULA)

Categories

Resources