Python Forum
Convert Excel to CSV and retain formatting
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Convert Excel to CSV and retain formatting
#6
The module xlrd.xldate apparently contains various functions to convert to and from excel dates. You could use one of them to convert the timestamps to a datetime object. Also the class Cell contains a ctype member which helps you determine if the cell contains a date or not. This could be used by your program to know whether the cell's content needs conversion.
Reply


Messages In This Thread
RE: Convert Excel to CSV and retain formatting - by Gribouillis - Jul-24-2020, 10:36 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Convert Excel file into csv with Pipe symbol.. mg24 4 1,336 Oct-18-2022, 02:59 PM
Last Post: Larz60+
  How do I read in a Formula in Excel and convert it to do the computation in Python? JaneTan 2 2,662 Jul-07-2021, 02:06 PM
Last Post: Marbelous
  Filter Excel and Convert an Excel File giddyhead 0 2,228 May-13-2021, 06:31 PM
Last Post: giddyhead
  Importing text file into excel spreadsheet with formatting david_dsmn 1 3,633 Apr-05-2021, 10:21 PM
Last Post: david_dsmn
  Matplotlib: How do I convert Dates from Excel to use in Matplotlib JaneTan 1 3,251 Mar-11-2021, 10:52 AM
Last Post: buran
  Openpyxl: Excel formula & condition formatting removed JaneTan 0 3,666 Sep-25-2020, 07:02 AM
Last Post: JaneTan
  how to retain time format in df.to_csv Mekala 2 3,183 Aug-07-2020, 07:04 AM
Last Post: buran
  Convert Excel file to Text file marvel_plato 6 19,745 Jul-17-2020, 01:45 PM
Last Post: marvel_plato
  convert old excel files(xls) to xlsm zarize 1 3,390 Jul-14-2020, 02:12 PM
Last Post: DeaD_EyE
  Convert Excel to complex list and2handles 1 2,059 Jun-23-2020, 01:51 PM
Last Post: DPaul

Forum Jump:

User Panel Messages

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