473,416 Members | 1,778 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,416 software developers and data experts.

Issues with OutputTo and TransferSpreadsheet

53
Hi,

I'm going to be giving many people an access database file with a switchboard with quite a few essential queries (query-by-form) so that they can pull data whenever they want. I have a button to export the file into excel as well. The issue I have is with this button.

I used to have this button running a macro that would OutputTo in Excel format. Since this limits me to around 16k records because of it outputting into microsoft excel 5.0, I could not use it. I then changed it to TransferSpreadsheet and I didn't put a path where it asked me, i just put the file name. This resulted in the file ending up in my documents (which is fine, because I can't put a full path since each user would not have that path). This is still an issue though since a user could have a large number of files in their my documents and it would be a nuisance to find it each time and if he has to export the same file another day and keep the old file, he would not have a choice to not overwrite the file.

What would be ideal is for that button to export into an excel version that allows the 65k rows and for the user to be asked where they want to put the file. This doesn't have to be the solution, but I can't leave it how it is. Can someone please suggest something?

I am using MS Access 2000 and MS Excel 2000.

Thanks in advance,

Raza
Aug 23 '07 #1
3 3093
RZ15
53
This issue is slowing me down considerably. Right now I'm using TransferSpreadsheet, then a msgbox saying "the file is in C:\SomeFile.xls" and then the excel file running using RunApp. This can take up to 20 minutes for some queries. This is a LONG time. I need a remedy.

Help is appreciated.
Aug 23 '07 #2
RZ15
53
if anyone can give me ANY insight on this, it would be appreciated...
Aug 24 '07 #3
missinglinq
3,532 Expert 2GB
I can't really help you on the question of speeding up your transfer times; in point of fact I don't even have Excel on my main development machine! Don't ask; it involves a minor flood, my seldom use of spreadsheets and Micro$oft's ridiculous policy of encouraging registration of all software and then not allowing that registration to serve as proof of ownership!

But as to the naming of exported files so as not to overwrite previous files, I can offer a hack I've used in exporting files to other formats. The trick is to export the file to a relative subfolder (relative, that is, to the folder that the database itself is stored in) and to tack on a date or date/time stamp to the name of the exported file. Simply substitute TheFile for the path/filename in whatever method you use to export your file.

Expand|Select|Wrap|Line Numbers
  1. TheDate = Month(Date) & "-" & Day(Date) & "-" & Year(Date) & "-at-" & Format(Time, "hh-mm-ampm")
  2.  
  3. TheFile = CurrentProject.Path & "\YourSubFolderName\YourFileName-" & TheDate & ".xls"
  4.  
CurrentProject.Path gives you the path to the folder where the database resides. If you wanted to store the exported files in the same folder as the db, instead of in a subfolder, you could use
Expand|Select|Wrap|Line Numbers
  1. TheFile = CurrentProject.Path & "\YourFileName-" & TheDate & ".xls"
Likewise, if only a date is desired you could omit the time portion of the name.

Hope this helps a little!

Linq ;0)>
Aug 24 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Randy Harris | last post by:
I'm using OutputTo to send data into Excel. It has been working nicely. Now, I need to add more worksheets using OutputTo. Whenever I use it, it replaces the existing worksheet. Is there any way...
1
by: barma16 | last post by:
I've hit a bit of a brick wall here, and could use some advice. I have an Access application whose output is a four-tab Excel spreadsheet where three of the four tabs are the result of database...
1
by: paul.hanti | last post by:
This board has been a plethora of information. Thanks to all that respond! I have a quick question regarding the built-in OutputTo macro. I've built a shared database in Access 2003 (in Access...
6
by: shumaker | last post by:
I have a form in an Access Project that displays some records, and based on the displayed records I'd like to output this to an excel file, but I need to write more fields of the record than are...
4
by: deko | last post by:
When using OutputTo with a query, the 'File name' window in the 'Output To' dialog gets populated with the name of the query by default. This makes the exported file self-describing if the query...
1
by: Ryan | last post by:
Hello. I was hoping that someone may be able to assist with an issue that I am experiencing. I have created an Access DB which imports an Excel File with a particular layout and field naming. ...
5
by: dancole42 | last post by:
I have a question regarding the DoCmd.OutputTo function. I have an invoice report that shows all of the invoices for a particular date. I want to create a button that will export each page of...
2
by: Jim Devenish | last post by:
I have a report which can be displayed on the screen with: DoCmd.OpenReport "RemittanceAdvice",acViewNormal,,"PaymentID = " & paymentRecID I now wish to create a snapshot of this, using the...
3
by: Icarus | last post by:
I'm using TransferSpreadsheet to import an Excel file in to MS Access 2003. DoCmd.TransferSpreadsheet acImport, 8, strTable, strFileName, True, "" One of the columns in the Excel file is a...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.