PC Review


Reply
Thread Tools Rate Thread

converting to excel and column data with carriage returns

 
 
Bernie Yaeger
Guest
Posts: n/a
 
      21st Feb 2004
I'm using the following function (I'm displaying the guts of it only) to
convert a datatable to an excel spreadsheet:

For Each mrow In dt.Rows
rowindex += 1

colindex = 0

For Each col In dt.Columns

colindex += 1

objws.Cells(rowindex, colindex) = mrow(col.ColumnName).ToString()

Next

Next

It works fine; however, when I convert columns with carriage returns in
them, the row does not wrap inside Excel; instead, you end up with a very
long (verticle) column. Inside Excel, even columns/autofit selection has
not effect. The entire spreadsheet, therefore, looks distorted. Is there
any way to strip out chr(10) + chr(13) from the data?

Thanks for any help.

Bernie Yaeger




 
Reply With Quote
 
 
 
 
Cor
Guest
Posts: n/a
 
      21st Feb 2004
Hi Bernie,

When you look down about 20 rows in this newgroup you see a question from
Able almost like this,

I found it funny because a lot of people where answering on that.

Armin gives as extra the answer you need complete. (with the vbcrlf)
(I would take that one, mine was just a completely alternative method from
the earlier posters and I posted the same time as Armin)

If you cannot find it, I can give you of course the answer, but there are so
much possibilities in this message and answers.

By the way, if it is than still not working have than also a look at the
"HT" "09" and "Lf" "13" because as far as I remember me, Cindy once told in
this newsgroup that that was used with Excel.

I hope this works.

Cor


 
Reply With Quote
 
Bernie Yaeger
Guest
Posts: n/a
 
      21st Feb 2004
Hi Cor,

I've looked 60 down and in different sort orders but can find no other
question like mine. Can you give me some more info on that message?

Tx,

Bernie

"Cor" <(E-Mail Removed)> wrote in message
news:ekIHEsF%(E-Mail Removed)...
> Hi Bernie,
>
> When you look down about 20 rows in this newgroup you see a question from
> Able almost like this,
>
> I found it funny because a lot of people where answering on that.
>
> Armin gives as extra the answer you need complete. (with the vbcrlf)
> (I would take that one, mine was just a completely alternative method from
> the earlier posters and I posted the same time as Armin)
>
> If you cannot find it, I can give you of course the answer, but there are

so
> much possibilities in this message and answers.
>
> By the way, if it is than still not working have than also a look at the
> "HT" "09" and "Lf" "13" because as far as I remember me, Cindy once told

in
> this newsgroup that that was used with Excel.
>
> I hope this works.
>
> Cor
>
>



 
Reply With Quote
 
Cor
Guest
Posts: n/a
 
      21st Feb 2004
Hi Bernie,

Here is the link on Google, saves time

http://www.google.com/groups?selm=fvmZb.5318$(E-Mail Removed)

If it is not what you ment, tell me, but I am almost sure of it.

Cor


 
Reply With Quote
 
Bernie Yaeger
Guest
Posts: n/a
 
      21st Feb 2004
Hi Cor,

Yes, that is exactly what I needed! Tx.

Bernie

"Cor" <(E-Mail Removed)> wrote in message
news:eu08pBJ%(E-Mail Removed)...
> Hi Bernie,
>
> Here is the link on Google, saves time
>
> http://www.google.com/groups?selm=fvmZb.5318$(E-Mail Removed)
>
> If it is not what you ment, tell me, but I am almost sure of it.
>
> Cor
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how do I remove Carriage Returns from a column in a spreadsheet? =?Utf-8?B?RG91ZyBS?= Microsoft Excel Misc 1 29th Jun 2005 08:29 PM
Carriage Returns in my data as a box ChuckW Microsoft Access Reports 7 15th Mar 2005 02:32 PM
Carriage returns and Excel Jerry Camel Microsoft Outlook Form Programming 3 11th Nov 2004 07:42 PM
Excel VBA - carriage returns KD Microsoft Excel Programming 1 7th Sep 2004 09:06 PM
carriage returns in excel darrellps Microsoft Excel Misc 2 3rd Aug 2004 02:14 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:45 AM.