Python Forum
Extracting CSV from Excel file
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Extracting CSV from Excel file
#1
Hello, I was curious if anyone knew how or could point me to some tutorials that could help me with a project. I have some excel files that have pivot tables in them using csv's. I was wondering if it was possible (since I do not have the csv files) to use Python to extract the csv file from Excel?

Many Thanks!
Reply
#2
what is the source of the pivot tables in the excel? Are the data on separate sheet or what?
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply
#3
None of the raw data is stored on another tab. The data is stored in the workbook Data Model.
Reply
#4
the raw data must come from somewhere - is it database or what? Speaking of Data Model I guess you are using PowerQuery
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply
#5
Yes, the original data comes from a database. The people who supply me with the excel sheets export the data from a database into a csv then load them into excel to create a pivot table.
Reply
#6
your files must have access to these files, what will happen if you refresh the pivot table, or make a change, e.g. add field, etc?
you can inspect the data source of the pivot table and see the data source/location of the files.
I don't think you can "extract" the raw data just from the aggregated data in the pivot table.
(May-11-2020, 05:37 PM)buran Wrote: I don't think you can "extract" the raw data just from the aggregated data in the pivot table.
Actually I may be wrong. Look at
https://stackoverflow.com/a/48231808/4046632
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Python openyxl not updating Excel file MrBean12 1 342 Mar-03-2024, 12:16 AM
Last Post: MrBean12
  Copy Paste excel files based on the first letters of the file name Viento 2 455 Feb-07-2024, 12:24 PM
Last Post: Viento
  Extracting specific file from an archive tester_V 4 523 Jan-29-2024, 06:41 PM
Last Post: tester_V
  Search Excel File with a list of values huzzug 4 1,265 Nov-03-2023, 05:35 PM
Last Post: huzzug
  Updating sharepoint excel file odd results cubangt 1 854 Nov-03-2023, 05:13 PM
Last Post: noisefloor
  Reading data from excel file –> process it >>then write to another excel output file Jennifer_Jone 0 1,116 Mar-14-2023, 07:59 PM
Last Post: Jennifer_Jone
  Save and Close Excel File avd88 0 3,084 Feb-20-2023, 07:19 PM
Last Post: avd88
  Trying to access excel file on our sharepoint server but getting errors cubangt 0 822 Feb-16-2023, 08:11 PM
Last Post: cubangt
  Import XML file directly into Excel spreadsheet demdej 0 859 Jan-24-2023, 02:48 PM
Last Post: demdej
  how to read txt file, and write into excel with multiply sheet jacklee26 14 10,051 Jan-21-2023, 06:57 AM
Last Post: jacklee26

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020