Excel Sheet to Vb.Net Array
Excel Sheet to Vb.Net Array
Excel Sheet to Vb.Net Array
Excel Sheet to Vb.Net Array
Excel Sheet to Vb.Net Array
Excel Sheet to Vb.Net Array Excel Sheet to Vb.Net Array Excel Sheet to Vb.Net Array Excel Sheet to Vb.Net Array Excel Sheet to Vb.Net Array Excel Sheet to Vb.Net Array Excel Sheet to Vb.Net Array Excel Sheet to Vb.Net Array
Excel Sheet to Vb.Net Array Excel Sheet to Vb.Net Array
Excel Sheet to Vb.Net Array
Go Back  Xtreme Visual Basic Talk > > > Excel Sheet to Vb.Net Array


Reply
 
Thread Tools Display Modes
  #1  
Old 08-30-2012, 08:18 AM
sss123 sss123 is offline
Newcomer
 
Join Date: Aug 2011
Posts: 12
Default Excel Sheet to Vb.Net Array


Hi there, hope you are well.

My program uses the following code to take an excel range into an array in vb.net:

Code:
Dim myRange as Excel.Range
myRange = xlApp.Range("A1:C3")

Dim myArray As Object(0,0)
myArray = myRange.Value
The problem is that I need the formatted values from the excel sheet, i.e. what is actually displayed rather the underlying values.

Does anyone know of a way of doing this without looping through each field and using
Code:
cell.text
as this is rather slow for the large spreadsheets I need to use this on.

Kind regards
Michael
Reply With Quote
  #2  
Old 08-31-2012, 06:18 AM
sss123 sss123 is offline
Newcomer
 
Join Date: Aug 2011
Posts: 12
Default

Anyone got any thoughts/suggestions?

Kind regards
Michael
Reply With Quote
  #3  
Old 09-05-2012, 10:23 AM
DubbleClick's Avatar
DubbleClick DubbleClick is offline
Contributor
 
Join Date: Mar 2005
Location: Tennessee
Posts: 511
Default

So you're saying the value of the cell is 123456, but you need to capture $123,456 because the cell formatting is currency?

No, you will have to read the individual cell formatting (or for the column), and then apply vb's formatting to the value. You can't extract the value of the cells and apply excels formatting to it.
Reply With Quote
Reply

Tags
excel range, vb.net array


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Excel Sheet to Vb.Net Array
Excel Sheet to Vb.Net Array
Excel Sheet to Vb.Net Array Excel Sheet to Vb.Net Array
Excel Sheet to Vb.Net Array
Excel Sheet to Vb.Net Array
Excel Sheet to Vb.Net Array Excel Sheet to Vb.Net Array Excel Sheet to Vb.Net Array Excel Sheet to Vb.Net Array Excel Sheet to Vb.Net Array Excel Sheet to Vb.Net Array Excel Sheet to Vb.Net Array
Excel Sheet to Vb.Net Array
Excel Sheet to Vb.Net Array
 
Excel Sheet to Vb.Net Array
Excel Sheet to Vb.Net Array
 
-->