Novo

Forum kao aplikacija na telefonu

Dodajte forum na početni ekran i koristite ga kao aplikaciju, sa menijem na dnu ekrana.

  • 3 odgovora
  • 3.387 pregleda

Najnovija ↓

Podatak iz excela u string u VB 20.10.2004. u 03:10 · pre 268 meseci #1
Zna li neko kako da u VB.NETu iz postojeceg fajla *.xls podatak iz celije
sa zadatim koordinatama da ubacim u string promenljivu?

Hvala
Re: Podatak iz excela u string u VB 15.11.2004. u 16:48 · pre 267 meseci #2
Treba da dodas sledece reference na projekat:
Interop.Excel
Interop.Microsoft.Office.Core
Interop.VBIDE

KAd to uradis : u kodu dodaj


Code:

 Dim xlWbook As Excel.Workbook                                  
 Dim mySheet As Excel.Worksheet 
 xlWbook = GetObject(strDirectoryPath & "\" & strFileName) 
 mySheet = xlWbook.Worksheets(1) 'Otvaras Sheet u Excell-u

Dim str As String =mySheet.Range("A4").Value  'ako hoces bilo koji tip iz Excela
'ili
Dim str As String=mySheet.Range("A8").Text    'ako hoces string 
 


Re: Podatak iz excela u string u VB 16.11.2004. u 09:59 · pre 267 meseci #3
Pardon, nisam ti rekao da ove reference ces ubaciti u projekat samo ako dodas
Com referencu Microsoft Office 10.0 Library
Re: Podatak iz excela u string u VB 16.11.2004. u 20:11 · pre 267 meseci #4
Mozda ti ovo bude korisno: An introduction on how to control Excel 2003 with J#.net. Primer je za J# (ma sta to trebalo da predstavlja :)), ali verujem da ces se snaci...
Potpis
If it's a girl then they're gonna call it Sigourney, after an actress. If it's a boy, then they're gonna call it Rodney, after Dave!
Prijavite se da biste odgovorili u ovoj temi.PrijavaRegistracija

Premeštanje teme