xlsReader

8 views
Skip to first unread message

heartland

unread,
Jun 25, 2008, 4:19:40 PM6/25/08
to CSVChat
Hi,

I installed new csvReader that contains xlsReader. However, I tested
with a simple xls file but could not get it right. I am having the
difficult to read the data beyond first row.

Can you give me a sample?

Following is my code:
Dim xlsReader As New XlsReader(FileName)
xlsReader.Settings.HasHeaders = False
For i As Integer = 0 To xlsReader.RecordCount - 1
xlsReader.CurrentRecord = i
ListBox1.Items.Add(xlsReader.Item(i).Trim)
Next
xlsReader.Close()

Thank you very much in advance for your help.

shriop

unread,
Jun 25, 2008, 6:36:44 PM6/25/08
to CSVChat
Download the demo projects from the site, http://www.csvreader.com/csv/dsdemo.zip
. You can change the code to load your file instead of the file
packaged with the demo project. The only thing I found odd in your
code below was the assignment to CurrentRecord. There's an overload
to .Item that takes a column index and a row index. What are you
seeing?

Bruce Dunwiddie

Lu, Hugh

unread,
Jun 26, 2008, 9:19:23 AM6/26/08
to CSV...@googlegroups.com
Thanks, Bruce. I will download the demo code and start from there. My code returned the data of the first row and empty strings for rest rows without error message.

Thanks again.

Hugh

Bruce Dunwiddie


This communication is for use by the intended recipient and contains
information that may be Privileged, confidential or copyrighted under
applicable law. If you are not the intended recipient, you are hereby
formally notified that any use, copying or distribution of this e-mail,
in whole or in part, is strictly prohibited. Please notify the sender by
return e-mail and delete this e-mail from your system. Unless explicitly
and conspicuously designated as "E-Contract Intended", this e-mail does
not constitute a contract offer, a contract amendment, or an acceptance
of a contract offer. This e-mail does not constitute a consent to the
use of sender's contact information for direct marketing purposes or for
transfers of data to third parties.

Francais Deutsch Italiano Espanol Portugues Japanese Chinese Korean

http://www.DuPont.com/corp/email_disclaimer.html

shriop

unread,
Jun 26, 2008, 11:11:00 AM6/26/08
to CSVChat
Let me know if you do find that the code does not seem to do what it
should or if a particular file does not seem to read correctly. The
excel format is reasonably complex so there have been random files
generated by random vendors with slight issues in their
implementations of excel files that are not being handled in the best
way by XlsReader.

Bruce Dunwiddie

On Jun 26, 8:19 am, "Lu, Hugh" <hugh...@pioneer.com> wrote:
> Thanks, Bruce. I will download the demo code and start from there.  My code returned the data of the first row and empty strings for rest rows without error message.
>
> Thanks again.
>
> Hugh
>
>
>
> -----Original Message-----
> From: CSV...@googlegroups.com [mailto:CSV...@googlegroups.com] On Behalf Of shriop
> Sent: Wednesday, June 25, 2008 5:37 PM
> To: CSVChat
> Subject: [CSVChat] Re: xlsReader
>
> Download the demo projects from the site,http://www.csvreader.com/csv/dsdemo.zip
>            http://www.DuPont.com/corp/email_disclaimer.html- Hide quoted text -
>
> - Show quoted text -
Reply all
Reply to author
Forward
0 new messages