The spreadsheet I'm trying to export to is not mine, which means I dont have full access to it.

04-28-2010, 06:29 PM

Stan Mathews

Re: Export to Excel Tabs?

If they're not going to give you the password there's not much we can do. If they give you the password then you can unprotect it manually and save it. Then operate on the unprotected version.

05-12-2010, 02:20 AM

Keith Hubert

Re: Export to Excel Tabs?

Hi Stan,

Back to this again.

OK, I can enter data into a selected tab, the next question is what is the best method to use to enter data into the same spreadsheet (a) but on a different tab and (b) different data onto a different tab?

05-12-2010, 08:20 AM

Stan Mathews

Re: Export to Excel Tabs?

Not sure I understand the question fully

If you want to address a specific sheet you use

XlApp.Sheets("sheetname").Select() 'note quotes

or

XlApp.Sheets(sheetnumber).Select()

If you want to put the same data

(a) but on a different tab

you repeat the code section and change the sheet number or name. You could also create a list of sheet numbers or names and feed them to a

for each..

next
loop

For (b) different data onto a different tab you change sheetnumbers or names and have a different set of data insertion instructions.

05-12-2010, 08:53 AM

Keith Hubert

Re: Export to Excel Tabs?

Hi Stan,

Sorry, did not explain properly.

What I had in mind was loading data from another table into the same spreadsheet but on another named tab.

The other aspect is, how do I control the path to see the spreadsheet in the My Documents folder?

What I had in mind was loading data from another table into the same spreadsheet but on another named tab.

The other aspect is, how do I control the path to see the spreadsheet in the My Documents folder?

Keith

Using the Alpha DAO export, I export multiple tables to a single spreadsheet with each table in it's own tab.

I can control what field go into a column.

Stan's method is fantastic if you need to have individual cell control, but requires a bit more work - as expected.

05-12-2010, 10:04 AM

Keith Hubert

Re: Export to Excel Tabs?

Thanks Guys.

You are just tooo much.

05-12-2010, 10:45 AM

Al Buchholz

Re: Export to Excel Tabs?

Quote:

Originally Posted by Keith Hubert

Thanks Guys.

You are just tooo much.

Hey, I resemble that remark... ;)

01-07-2019, 07:36 AM

DORaymond

Re: Export to Excel Tabs?

Stan - This is an old post, but I have a project where I need to integrate Alpha with Excel. Do you know where I can find documentation where I can learn more about the code you have used in this thread?

Thanks - Don

01-13-2019, 08:50 PM

Mike Wilson

Re: Export to Excel Tabs?

Hi Don,
When you say that you need to "integrate" Alpha with Excel, can you explain what that means more specifically? The application I developed and manage now has so many interfaces with Excel that I wonder what your definition of "integrate" is.

01-14-2019, 07:11 AM

DORaymond

Re: Export to Excel Tabs?

Mike - thanks for your reply. I worked out what I wanted to accomplish using bits of the code on this thread and some internet searching. I have an app where I needed one records worth of data at a time to be injected into different excel sheets.

HTML Code:

Dim templatex AS C
Dim cutsheetx AS C
Dim xlApp as p
dim myCell as c

templatex = "P:/Donald/" +alltrim(var->Template)+ ".xlsx" 'This is the template file to use
cutsheetx = "P:/Donald/" +alltrim(str(var->Cutsheetkey))+ ".xlsx" 'This is the name of the file that is created/saved