Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > it.comp.lang.visual-basic > #18823
| X-Received | by 10.107.129.160 with SMTP id l32mr8183081ioi.13.1466812359401; Fri, 24 Jun 2016 16:52:39 -0700 (PDT) |
|---|---|
| X-Received | by 10.36.124.143 with SMTP id a137mr208618itd.9.1466759394897; Fri, 24 Jun 2016 02:09:54 -0700 (PDT) |
| Path | csiph.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!news.glorb.com!r1no449267ige.0!news-out.google.com!i62ni1869ith.0!nntp.google.com!jk6no442228igb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail |
| Newsgroups | it.comp.lang.visual-basic |
| Date | Fri, 24 Jun 2016 02:09:54 -0700 (PDT) |
| Complaints-To | groups-abuse@google.com |
| Injection-Info | glegroupsg2000goo.googlegroups.com; posting-host=213.215.169.20; posting-account=yvxj_woAAABxrxq8XihQzP-tWUWpycQc |
| NNTP-Posting-Host | 213.215.169.20 |
| User-Agent | G2/1.0 |
| MIME-Version | 1.0 |
| Message-ID | <709da859-b30c-42f0-8fa1-7f3fde6da939@googlegroups.com> (permalink) |
| Subject | Dati in excel |
| From | Marco75 <marcoporzi75@gmail.com> |
| Injection-Date | Fri, 24 Jun 2016 23:52:39 +0000 |
| Content-Type | text/plain; charset=UTF-8 |
| Content-Transfer-Encoding | quoted-printable |
| Xref | csiph.com it.comp.lang.visual-basic:18823 |
Show key headers only | View raw
Ciao a tutti,
sto sviluppando un'app in Visual Studio 2010 che deve leggere i dati in arrivo da una bilancia e poi deve metterli in Excel.
I dati dalla bilancia li leggo e li metto in una TxtBox multiline
Il file di Excel lo creo ed inserisco i dati letti
Devo però sistemare 2 cose:
Nella TxtBox, i dati da bilancia arrivano con l'aggiunta della lettera g (grammi)
8,93 g
7,58 g
...
...
vorrei togliere la g, il codice di popolamento TxtBox è questo:
Private Sub UpDateText(ByVal [Text] As String)
If Me.RicDati.InvokeRequired Then
Dim Cmp As New SetTextCallback(AddressOf UpDateText)
Me.Invoke(Cmp, New Object() {(Text)})
Else
Me.RicDati.Text &= [Text]
Me.Conteggio.Text = Me.RicDati.Lines.Count - 1
End If
End Sub
volevo sostituire Me.RicDati.Text &= [Text]con qualcosa tipo questo ma non funziona:
'Me.RicDati.Text &= Microsoft.VisualBasic.Right([Text], 1)
la 2° domanda è questa:
in Excel mi mette tutti i dati nella cella A1 mentre dovrebbe mettere il 1° nella A1, il 2° nella A2 ecc...
Questo il codice che gestisce Excel:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim Xl As New Excel.Application
Dim xlBook As Excel.Workbook
xlBook = Xl.Workbooks.Add
xlBook.Worksheets(1).activate()
xlBook.Worksheets(1).cells(1, 1) = Me.RicDati.Text.ToString
Xl.Visible = True
End Sub
mi potete dare una mano?
grazie
Marco
Back to it.comp.lang.visual-basic | Previous | Next — Next in thread | Find similar
Dati in excel Marco75 <marcoporzi75@gmail.com> - 2016-06-24 02:09 -0700
Re: Dati in excel Antologiko <antologiko@gmail.com> - 2016-06-24 21:10 -0700
Re: Dati in excel Antologiko <antologiko@gmail.com> - 2016-06-24 21:15 -0700
csiph-web