473,809 Members | 2,649 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem with Reserved Character in TransferSpreads heet method

Hello Everybody,

I am using the TransferSpreads heet method to import spreadsheets for
processing.

say my code looks like this:

DoCmd.TransferS preadsheet acImport, 0, _
"tbltempImport1 ", "" & strFileExtn, False, "Spreadheet1!A1 :D30"

No Problem There.

However, if it looks like this:

DoCmd.TransferS preadsheet acImport, 0, _
"tbltempImport2 ", "" & strFileExtn, False, "Spreadheet 2 !A1:D30"

If fails.

What is the difference?
There is a space at the end of Spreadsheet2 I can't change the way
these are named.

So my query is this.

1 Can I get around the problem of TransferSpreads heet choking when
there is a space at the end of the spreadsheet (tab) name.

2 How do I rename the sheet in Excel from Access.
Thanks a million guys.

O'Donnell
Nov 12 '05 #1
1 4229
Have you tried putting single quotes around the spreadsheet name like this:

DoCmd.TransferS preadsheet acImport, 0, _
"tbltempImport2 ", "" & strFileExtn, False, "'Spreadhee t2 '!A1:D30"

It's the appropriate reference syntax for a sheet name with spaces in Excel.

Jude

sp*******@hotma il.com (O'Donnell Tribunal) wrote in message news:<a9******* *************** ****@posting.go ogle.com>...
Hello Everybody,

I am using the TransferSpreads heet method to import spreadsheets for
processing.

say my code looks like this:

DoCmd.TransferS preadsheet acImport, 0, _
"tbltempImport1 ", "" & strFileExtn, False, "Spreadheet1!A1 :D30"

No Problem There.

However, if it looks like this:

DoCmd.TransferS preadsheet acImport, 0, _
"tbltempImport2 ", "" & strFileExtn, False, "Spreadheet 2 !A1:D30"

If fails.

What is the difference?
There is a space at the end of Spreadsheet2 I can't change the way
these are named.

So my query is this.

1 Can I get around the problem of TransferSpreads heet choking when
there is a space at the end of the spreadsheet (tab) name.

2 How do I rename the sheet in Excel from Access.
Thanks a million guys.

O'Donnell

Nov 12 '05 #2

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

Similar topics

4
37694
by: Krishna A.M | last post by:
Hi, How do i add a hyperlink to a email id having special characters? I tried the same , say mailto: test_&_send@hoohoo.com IN the to box i can see only till test_ and the rest is omitted. Any ideas how the tags could be bypassed? Though i am not a web page designer, I tried &amp; but with no luck. Any help would be highly appreciated.
4
1612
by: andrewflanders | last post by:
I have an associative array of keys and values. I want to search a string for the existance of keys and replace them with the values in the array. The problem is that some of the keys resemble regular expressions but they are not so if I build the regular expression with a constructor it causes errors saying that the regular expression syntax is bad. I got around this problem by skipping the regular expression method and passing in the key...
2
7168
by: JMCN | last post by:
hello i have your basic select case question. i created a combo box and save it as a query. so whenever the user selects the value and clicks the export button, the select case should then export the data. however, it does not export the it. so then i converted the export macro to VB and used "call" to call function but it did not work. what am i doing wrong or more precisely what am i leaving out? thanks in advance, jung
1
6199
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 queries. A number of fields in the queries are designed to become formulae in Excel after the export has taken place (and they need to be in Excel rather than Access). I need to use the TransferSpreadsheet Method rather than the OutputTo to enable...
5
4149
by: Gary Cobden | last post by:
I have a problem with the following code, which leaves an instance of Excel visible in Task Manager. By a process of elimination I have got it down to the fact that something in the DoCmd.Transfer Spreadsheet line is holding on to an Excel reference somewhere - can anybody assist (if I comment this line out, the instance is released, and not visible in Task Manager). Private Sub btnLoadData_Click() Dim xlApp2 As Object
0
3946
by: Lokkju | last post by:
I am pretty much lost here - I am trying to create a managed c++ wrapper for this dll, so that I can use it from c#/vb.net, however, it does not conform to any standard style of coding I have seen. It is almost like it is trying to implement it's own COM interfaces... below is the header, and a link to the dll+code: Zip file with header, example, and DLL:...
2
2723
by: DeanL | last post by:
Hey Guys, Does anyone know of a way to format the output of the TransferSpreadsheet method in Access 97 so that the exported spreadsheet has some formatting (column widths, row heights, cell colors, bold, italic, etc.) Thanks in advance, Dean...
3
4333
by: JHNielson | last post by:
I am having quite the unique problem trying to Export to Excel and I need ot find a solution within 3 hours. -- PLEASE HELP! The system exports a file from the application that the users can make changes to and then reimport. But now matter what format I specify to export to, when I open the exported files, it says they are in Excel 5.0. I originally used the code: DoCmd.OutputTo acTable, "PRC_REPRT",...
6
3535
by: efrenba | last post by:
Hi, I came from delphi world and now I'm doing my first steps in C++. I'm using C++builder because its ide is like delphi although I'm trying to avoid the vcl. I need to insert new features to an old program that I wrote in delphi and it's a good opportunity to start with c++.
0
9603
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10643
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10378
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10391
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9200
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6881
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5550
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5690
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4333
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.