Python Forum
Create a csv file that pulls data from an .accdb file
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Create a csv file that pulls data from an .accdb file
#1
Photo of Attachment.accdb file Attachment1.accdb



So I have several Attachment.accdb files in my directory. I need help figuring out the correct python code to first call out to my directory and to list out all the .accdb files ONLY.

So then my output data should look something like this:
Attachment1.accdb
Attachment2.accdb
Attachment3.accdb
Attachment4.accdb
Attachment5.accdb


From there I need to figure out a way to turn my output into a variable that I can call upon later.


I then need to figure out a way to make a connection to the .accdb filse and build a list of every ReqID within the .accdb file. This list will hold all the ReqIDs from all the .accdb files.


***The ID and ReqID are from the image link shown above. If I were to open up an attachment.accdb file they consist of the following table information

In the end I will have a detailed list showing:
ID (Unique integer), ReqID, name of accdb file
ID (Unique integer), ReqID, name of accdb file
ID (Unique integer), ReqID, name of accdb file
ID (Unique integer), ReqID, name of accdb file
ID (Unique integer), ReqID, name of accdb file


I am very new to python. But am in need of great guidance and assistance.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to write variable in a python file then import it in another python file? tatahuft 4 860 Jan-01-2025, 12:18 AM
Last Post: Skaperen
  JSON File - extract only the data in a nested array for CSV file shwfgd 2 1,014 Aug-26-2024, 10:14 PM
Last Post: shwfgd
  FileNotFoundError: [Errno 2] No such file or directory although the file exists Arnibandyo 0 812 Aug-12-2024, 09:11 AM
Last Post: Arnibandyo
  To fetch and iterate data from CSV file using python vyom1109 3 958 Aug-05-2024, 10:05 AM
Last Post: Pedroski55
  "[Errno 2] No such file or directory" (.py file) IbrahimBennani 13 6,110 Jun-17-2024, 12:26 AM
Last Post: AdamHensley
  Reading an ASCII text file and parsing data... oradba4u 2 1,373 Jun-08-2024, 12:41 AM
Last Post: oradba4u
  Extracting the correct data from a CSV file S2G 6 1,739 Jun-03-2024, 04:50 PM
Last Post: snippsat
  encrypt data in json file help jacksfrustration 1 2,146 Mar-28-2024, 05:16 PM
Last Post: deanhystad
  Create Choices from .ods file columns cspower 3 1,724 Dec-28-2023, 09:59 PM
Last Post: deanhystad
  file open "file not found error" shanoger 8 5,933 Dec-14-2023, 08:03 AM
Last Post: shanoger

Forum Jump:

User Panel Messages

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