Exporting to Excel (Macro)

H

Harddrive747

I have done a lot of coding, so I know what commands to use, but I have a
couple of questions.

1. I have tables in Access that have spaces in the name, such as Lexington
Park. When I export that to Microsoft Excel, the transfer converts that to
Lexington_Park in the spreadsheet. Why is it doing this and how do I get it
to stop putting the "_" in where the space is suppose to be. This is messing
up a lot of other things I do with the name.

2. I know that I can import data from Excel using a range or starting at a
specific location. I haven't done it, but would like to. I have a dozen
sheets in a workbook and each of them have a different length of data in
them. I would like to be able to pull it directly from workbook, instead of
having to create a seperate file, which I'm doing right now. Along with that
changing to the next worksheet to get the next set of data.

3. This follows along with question 2 about exporting from Access to Excel.
Is there a way that I can export only data to a spreadsheet with different
sheet names and then start at say cell A20 and paste the data in?

Thanks for letting me know on these questions
 
R

rfuscjr via AccessMonster.com

1) I may be way off base, if so I applogize. I import data into Excel at
times programatically using an imprt specification file, perhaps there is
such a thing as an output specification file....

2) so you are saying you have say 5 colums of data spread over 3 sheets and
you wish to say, always pull rows 5-50 on sheet one, 10-200 on sheet2 and 3-6
on sheet3. One way is to get the data via 3 Access pulls into 3 Access
tables. You desire to get the data all in one shot into one Access table
right? If so, could you not have a hidden sheet in Excel that acculmulates
the rows you want (using '=' or vlookups or something) and then have Access
link to the hidden sheet.?

3) you want to do the reverse of 2? Couldn't the same philosophy prevail,
export from access to hidden sheet. Have sheets 1/2/3 pull the data from the
hidden sheet?
 
H

Harddrive747

importing isn't the problem. The problem is when I export from Access to
Excel. One of the two applications is causing the space between names to be
replaced with an "_". So like I said, I have a unit name like Lexington
Park. When I export the result of a table called Lexington Park to Excel, I
end up with a worksheet name of Lexington_Park. I'm wondering which
application is doing this and what, if anything, can be done about it?

I'm thinking about doing a case statement to rename the workstheets, copy my
data and then rename them back, which is a lot of work.

So any help or suggestions would be greatly appreciated.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top