Hi guys! Do you know what is the best way to export a text file, this
one is a log file that is already comma delimited thru a module run by
my access database, to an excel spreadsheet? I need to do this thru
the module, and I don't see how I can export a txt file from access
without loading it to a temp table first. I've checked out the
DoCmd.TransferText methods, where you have to have a table or query or
schema ini first, and the OutputTo, which is thru a table or query
again. Can access transfer text files directly from a module without
having them in a table? Or do I maybe just need to name the txt file
as a *.csv file, and then somehow copy that file to an .xls
spreadsheet?
The users want to be able to just go to a directory and open a .xls
spreadsheet.
If anybody can help with ideas, I would appreciate it! Thanks! 3 3009 ex********@gmail.com wrote:
Hi guys! Do you know what is the best way to export a text file, this
one is a log file that is already comma delimited thru a module run by
my access database, to an excel spreadsheet? I need to do this thru
the module, and I don't see how I can export a txt file from access
without loading it to a temp table first. I've checked out the
DoCmd.TransferText methods, where you have to have a table or query or
schema ini first, and the OutputTo, which is thru a table or query
again. Can access transfer text files directly from a module without
having them in a table? Or do I maybe just need to name the txt file
as a *.csv file, and then somehow copy that file to an .xls
spreadsheet?
The users want to be able to just go to a directory and open a .xls
spreadsheet.
If anybody can help with ideas, I would appreciate it! Thanks!
PS - Here is my text log sub -which is how I created the text file.
Sorry I forgot to include it to begin with. It's my newb code so
please forgive the messiness...
Sub Write_NoShip_Log(Test_Report As String)
Dim fso, f, objFile, objText
Dim strPath As String
CurrDate = Format(Now, "mm-dd-yyyy")
Set fso = CreateObject("Scripting.FileSystemObject")
strPath = fso.GetFile(TextPath & "$CQAR_" & CurrDate & ".txt")
Set objText = fso.OpenTextFile(strPath, ForAppending,
TristateUseDefault)
objText.WriteLine Test_Report
objText.Close
Set objText = Nothing
Set fso = Nothing
End Sub
Can I just write it as a csv? Did I make this too big of a deal? I
need the users to just magically open up an excel file.
Import the csv as a linked table, you can then use the table or a query to
export to Excel.
Or, output directly into an Excel spreadsheet instead of csv.
"Holly" <ex********@gmail.comwrote in message
news:11**********************@b28g2000cwb.googlegr oups.com...
> ex********@gmail.com wrote:
Hi guys! Do you know what is the best way to export a text file, this
one is a log file that is already comma delimited thru a module run by
my access database, to an excel spreadsheet? I need to do this thru
the module, and I don't see how I can export a txt file from access
without loading it to a temp table first. I've checked out the
DoCmd.TransferText methods, where you have to have a table or query or
schema ini first, and the OutputTo, which is thru a table or query
again. Can access transfer text files directly from a module without
having them in a table? Or do I maybe just need to name the txt file
as a *.csv file, and then somehow copy that file to an .xls
spreadsheet?
The users want to be able to just go to a directory and open a .xls
spreadsheet.
If anybody can help with ideas, I would appreciate it! Thanks!
PS - Here is my text log sub -which is how I created the text file.
Sorry I forgot to include it to begin with. It's my newb code so
please forgive the messiness...
Sub Write_NoShip_Log(Test_Report As String)
Dim fso, f, objFile, objText
Dim strPath As String
CurrDate = Format(Now, "mm-dd-yyyy")
Set fso = CreateObject("Scripting.FileSystemObject")
strPath = fso.GetFile(TextPath & "$CQAR_" & CurrDate & ".txt")
Set objText = fso.OpenTextFile(strPath, ForAppending,
TristateUseDefault)
objText.WriteLine Test_Report
objText.Close
Set objText = Nothing
Set fso = Nothing
End Sub
Can I just write it as a csv? Did I make this too big of a deal? I
need the users to just magically open up an excel file.
Thank you Ron! That was all I needed!
paii, Ron wrote:
Import the csv as a linked table, you can then use the table or a query to
export to Excel.
Or, output directly into an Excel spreadsheet instead of csv.
"Holly" <ex********@gmail.comwrote in message
news:11**********************@b28g2000cwb.googlegr oups.com...
ex********@gmail.com wrote:
Hi guys! Do you know what is the best way to export a text file, this
one is a log file that is already comma delimited thru a module run by
my access database, to an excel spreadsheet? I need to do this thru
the module, and I don't see how I can export a txt file from access
without loading it to a temp table first. I've checked out the
DoCmd.TransferText methods, where you have to have a table or query or
schema ini first, and the OutputTo, which is thru a table or query
again. Can access transfer text files directly from a module without
having them in a table? Or do I maybe just need to name the txt file
as a *.csv file, and then somehow copy that file to an .xls
spreadsheet?
>
The users want to be able to just go to a directory and open a .xls
spreadsheet.
>
If anybody can help with ideas, I would appreciate it! Thanks!
PS - Here is my text log sub -which is how I created the text file.
Sorry I forgot to include it to begin with. It's my newb code so
please forgive the messiness...
Sub Write_NoShip_Log(Test_Report As String)
Dim fso, f, objFile, objText
Dim strPath As String
CurrDate = Format(Now, "mm-dd-yyyy")
Set fso = CreateObject("Scripting.FileSystemObject")
strPath = fso.GetFile(TextPath & "$CQAR_" & CurrDate & ".txt")
Set objText = fso.OpenTextFile(strPath, ForAppending,
TristateUseDefault)
objText.WriteLine Test_Report
objText.Close
Set objText = Nothing
Set fso = Nothing
End Sub
Can I just write it as a csv? Did I make this too big of a deal? I
need the users to just magically open up an excel file.
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Gary Wright |
last post by:
I have an Access 2K database split into front and back. Quite often the
users want to do some data analysis that I have not created a report for so
they want to export some subset of the data into...
|
by: Robin Cushman |
last post by:
Hi all,
I need some help -- I'm working with an A2K database, using DAO, and
am trying to read records into a Crystal Report and then export it to
a folder on our network as an Excel...
|
by: bonehead |
last post by:
Greetings,
I'm using the DoCmd.TransferText method to export the results of a MS
Access query to a csv file. The csv will then be used to load an Oracle
table.
In other systems such as TOAD...
|
by: Simon |
last post by:
Dear reader,
With the export command you can export a query to Excel.
By activate this command a form pop's up with the following text:
|
by: smaczylo |
last post by:
Hello, I've recently been asked to work with Microsoft Access, and
while I feel quite comfortable with Excel, I'm at a complete loss with
databases. If someone could help me with this issue I'm...
|
by: CoolFactor |
last post by:
MY CODE IS NEAR THE BOTTOM
I want to export this Access query into Excel using a command button on an Access form in the following way I describe below.
Below you will find the simple query I am...
|
by: Pauline |
last post by:
Dear all,
I have an enormous database (Access 2003) containing sales information, and an Excel tool to enable end users to do planning and forecasting. Untill now I would create several queries,...
|
by: StevoNZ |
last post by:
I've been using Access to export data to Excel all year... this data has been increasing in size as the project nears compleion and now I find that when I export a table (or query) to Excel using the...
|
by: =?Utf-8?B?YzY3NjIyOA==?= |
last post by:
Hi all,
I have a question for you.
I have a .csv file which has many lines of data.
Each line has many data fields which are delimited by ",".
Now I need to extract part of data from this...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM).
In this month's session, the creator of the excellent VBE...
|
by: MeoLessi9 |
last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: Aftab Ahmad |
last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below.
Dim IE As Object
Set IE =...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
| |