Python Forum
how to read txt file, and write into excel with multiply sheet
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to read txt file, and write into excel with multiply sheet
#15
hi i have some questions about the index s1 = result[:3]
what if my file have more than 3 line, if my text file as below
datetime name department
20220101 James IT
20220101 Test IT
20220101 Test IT
20220101 Test IT
20220101 Test IT
20220101 Test IT
================
datetime name country
20220101 James US
20220101 Test US
20220101 Test US
================

it seems like putting a fixed index is not a good way, is there any method without using fixed index.
Reply


Messages In This Thread
RE: how to read txt file, and write into excel with multiply sheet - by jacklee26 - Jan-21-2023, 06:57 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Delete file with read-only permission, but write permission to parent folder cubei 7 22,069 8 hours ago
Last Post: johndavis78
  Connecting to Remote Server to read contents of a file ChaitanyaSharma 1 357 May-03-2024, 07:23 AM
Last Post: Pedroski55
  What does .flush do? How can I change this to write to the file? Pedroski55 3 382 Apr-22-2024, 01:15 PM
Last Post: snippsat
  Python openyxl not updating Excel file MrBean12 1 441 Mar-03-2024, 12:16 AM
Last Post: MrBean12
  Copy Paste excel files based on the first letters of the file name Viento 2 553 Feb-07-2024, 12:24 PM
Last Post: Viento
  Last record in file doesn't write to newline gonksoup 3 543 Jan-22-2024, 12:56 PM
Last Post: deanhystad
  Recommended way to read/create PDF file? Winfried 3 3,043 Nov-26-2023, 07:51 AM
Last Post: Pedroski55
  write to csv file problem jacksfrustration 11 1,782 Nov-09-2023, 01:56 PM
Last Post: deanhystad
  python Read each xlsx file and write it into csv with pipe delimiter mg24 4 1,725 Nov-09-2023, 10:56 AM
Last Post: mg24
  Search Excel File with a list of values huzzug 4 1,371 Nov-03-2023, 05:35 PM
Last Post: huzzug

Forum Jump:

User Panel Messages

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