473,388 Members | 1,552 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,388 software developers and data experts.

TransferSpreadsheet - how to call this function

I've tried
DoCmd.TransferSpreadsheet( 1, 8, "aaa" , "d:\\ddd.xls", false, NULL, true);
but it fails

GREAT THANKS for help

T.

_Application app; // app is the Excel _Application object
app.CreateDispatch("Access.Application");
app.SetVisible(TRUE);
app.OpenCurrentDatabase("d:\\rai.bis\\mdb\\dane.md b",true);
LPDISPATCH lDoCommand = app.GetDoCmd ();
IDoCmd DoCmd (lDoCommand);

DoCmd.TransferSpreadsheet( 1, 8, "aaa" , "d:\\ddd.xls", false, NULL,
true);

/*
void IDoCmd::TransferSpreadsheet(long TransferType, long SpreadsheetType,
const VARIANT& TableName, const VARIANT& FileName, const VARIANT&
HasFieldNames, const VARIANT& Range, const VARIANT& UseOA)
{
static BYTE parms[] =
VTS_I4 VTS_I4 VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT VTS_VARIANT;
InvokeHelper(0x411, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
TransferType, SpreadsheetType, &TableName, &FileName, &HasFieldNames,
&Range, &UseOA);
}
*/

Nov 14 '05 #1
2 2454
Tomek <xx*****@wp.pl> spoke thus:
DoCmd.TransferSpreadsheet( 1, 8, "aaa" , "d:\\ddd.xls", false, NULL, true);
but it fails


Your post is off-topic for comp.lang.c. Please visit

http://www.ungerhu.com/jxh/clc.welcome.txt
http://www.eskimo.com/~scs/C-faq/top.html
http://benpfaff.org/writings/clc/off-topic.html

for posting guidelines and frequently asked questions. Thank you.

--
Christopher Benson-Manica | I *should* know what I'm talking about - if I
ataru(at)cyberspace.org | don't, I need to know. Flames welcome.
Nov 14 '05 #2
Not only is that a platform and application-specific query, but
it's not even C!

Can you read?

COMP.LANG.C
Nov 14 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

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...
3
by: user_5701 | last post by:
Hello, I'm getting an error with a Docmd.Transferspreadsheet line of code: DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel2000, "tblTest", pathAndFilename, True The above line...
13
by: aleksandra_83 | last post by:
Hello, I have searched all over google groups and internet, but I have not found a solution to this problem that has worked. The solutions I found helped me single out the line that is causing...
6
by: sara | last post by:
I have a procedure to automate bringing several Excel files into our Access tables, on a daily basis. The problem is that if the user has a problem, and tries to run the import again (maybe 3...
0
by: robert.waters | last post by:
Hello, When executing DoCmd.TransferSpreadsheet to an .xls file that's being used as a datasource for a Word mail merge document, if that Word document is currently open, the TransferSpreadsheet...
0
by: Dave | last post by:
Ok...here's a good one. I wrote an ADP application in ACCESS XP with a SQL 2000 back end. Works Great! Recently we did a server migration and transfered the database to another server. Setup...
5
by: Dave | last post by:
Ok...here's a good one. I wrote an ADP application in ACCESS XP with a SQL 2000 back end. Works Great! Recently we did a server migration and transfered the database to another server. Setup...
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...
2
by: AlenaMezh | last post by:
Hello! My Code destroys Excel's normal work.After running this code I acan' open excel file as normal. Do you know why? Please, answer. Public Function import_test_1() Dim objXL As Object Dim...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...

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.