Topic
Import data from an excell workbook
Page d'accueil ' Communauté ' Automation et VBA ' Importation de données à partir d'un excellent cahier de travail
- Ce sujet contient 2 réponses, 2 participants et a été mis à jour pour la dernière fois par Nicolas Beaupré, le il y a 19 années et 4 mois.
-
AuteurMessages
-
12.01.2006 à 23:45 #34991Nicolas BeaupréParticipant
I got an excell workbook “blast2” witch is inserted in my database. I want to access the data in it or import it in DataSets. This workbook as more than one sheet. I’ve put an exemple of that workbook in attachment.
I’ve created an ExcelFolder object that way and it refer to the correct element.
[code]Dim fExcell As ExcelFolder
Set fExcell = ActiveDatabase.RootFolder.Object(“blast2”, fpObjectTypeExcelWorkbook)[/code]How can I access, for exemple, the data in the C:5 cell of the tir1 sheet ?
12.01.2006 à 23:45 #34993Nicolas BeaupréParticipantI got an excell workbook “blast2” witch is inserted in my database. I want to access the data in it or import it in DataSets. This workbook as more than one sheet. I’ve put an exemple of that workbook in attachment.
I’ve created an ExcelFolder object that way and it refer to the correct element.
[code]Dim fExcell As ExcelFolder
Set fExcell = ActiveDatabase.RootFolder.Object(“blast2”, fpObjectTypeExcelWorkbook)[/code]How can I access, for exemple, the data in the C:5 cell of the tir1 sheet ?
13.01.2006 à 00:05 #34992Bernhard KantzParticipantYou can create a [b]ExcelDataLink[/b].
In VBA you could use this code:
[code]
Dim oExcel As ExcelFolder
Set oExcel = ActiveDatabase.RootFolder.Object(“blast2”, fpObjectTypeExcelWorkbook)
With oExcel.Add(“data”, fpObjectTypeExcelDataLink)
.YComponent = “tir1!C5”
.YLineByLine = True
‘.Evaluate
.Update
End With
[/code]
support@weisang.com -
AuteurMessages
- Vous devez être connecté pour répondre à ce sujet.