Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help
Message
De
13/08/2001 14:12:30
Jason Dalio
Northern Interior Regional Health Board
Prince George, Colombie Britannique, Canada
 
 
À
13/08/2001 09:53:10
Information générale
Forum:
Microsoft Office
Catégorie:
Access
Titre:
Re: Help
Divers
Thread ID:
00541826
Message ID:
00543168
Vues:
16
Isn't access fun Lisa? Gawd, I can't stand using Access anymore except for fast prototyping. :)

My answer to your question is probably to use Automation. Unless you are trying to something very simple (like an append to the spreadsheet) you will want to use Automation (automation is the old terminology for it and I think they now refer to it as connecting to COM servers). Automation will allow you to open the spreadsheet and work with it directly. Using this method you can do full cell manipulation and it shoul give you what you want. The detail on automation is to large to post here but I have included a small example of creating a new spreadsheet from a Microsoft Press book.

Hopefully this will put you on the right track. Take care.

Private Sub mnuReportsInvoice_Click()
Static xl As Excel.Application
Set xl = New Excel.Application
With xl
.Visible = True
.Workbooks.Add
With .Range("A1")
.Value = "Chateau St. Mark Invoice"
.Font.Bold = True
.Font.Name = "Times New Roman"
.Font.Size = 26
End With
.Range("A4").Value = "Name:"
.Range("B4").Value = txtFirstName.Text & " " & txtLastName.Text
With .Range("A5")
.Value = "Address"
.VerticalAlignment = xlTop
End With
With .Range("B5")
.Value = txtAddress.Text
.ColumnWidth = 20
.WrapText = True
End With
.Range("A6").Value = "Number of Days:"
.Range("B6").Value = txtNumDays.Text
.Range("A7").Value = "Rate:"
.Range("B7").Value = txtRate.Text
.Range("A8").Value = "Total Due:"
.Range("B8").Value = Format(CSng(txtNumDays.Text) * CSng(txtRate.Text), "Currency")

'The rest
End With
Columns("A:A").ColumnWidth = 25
xl.ActiveWorkbook.PrintPreview
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform