Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > how to send layout (color, bold ..) to a excel cell using objStreamWriter?

Reply
Thread Tools

how to send layout (color, bold ..) to a excel cell using objStreamWriter?

 
 
Luc
Guest
Posts: n/a
 
      12-29-2009
Hi,

i use objStreamWriter for writing data to an excel sheet.

objStreamWriter = New StreamWriter(objFileStream)
objStreamWriter.WriteLine("title" & chr(9) & "name")
etc ...
This works perfect.
But is it also possible to give a cell a color, or to make the text sent to
a cell bold?
Thanks
Luc


 
Reply With Quote
 
 
 
 
Patrice
Guest
Posts: n/a
 
      12-29-2009
Hi,

Which format do you use ?

For now it seems you are using CSV which allows only to import data. If you
want to use formatting you could use HTML (Excel is able to import HTML
tables), XML (either the old xml format or what is now the native format),
use automation to control Excel (if client side)) or use a third party
product such as Aspose.Cells...

Basically it seems you'll have to redesign how data are exported...

--
Patrice

"Luc" <(E-Mail Removed)> a écrit dans le message de
news:(E-Mail Removed)...
> Hi,
>
> i use objStreamWriter for writing data to an excel sheet.
>
> objStreamWriter = New StreamWriter(objFileStream)
> objStreamWriter.WriteLine("title" & chr(9) & "name")
> etc ...
> This works perfect.
> But is it also possible to give a cell a color, or to make the text sent
> to a cell bold?
> Thanks
> Luc
>


 
Reply With Quote
 
 
 
 
Luc
Guest
Posts: n/a
 
      12-29-2009
thanks for replying.

Imagine all i want is to send "ok" but in bold.
what do i have actually to change to this code for that?
objStreamWriter = New StreamWriter(objFileStream)
objStreamWriter.WriteLine("ok" )
....
that's all i want to know.
Thanks


"Patrice" <http://scribe-en.blogspot.com/> schreef in bericht
news:OnY$(E-Mail Removed)...
> Hi,
>
> Which format do you use ?
>
> For now it seems you are using CSV which allows only to import data. If
> you want to use formatting you could use HTML (Excel is able to import
> HTML tables), XML (either the old xml format or what is now the native
> format), use automation to control Excel (if client side)) or use a third
> party product such as Aspose.Cells...
>
> Basically it seems you'll have to redesign how data are exported...
>
> --
> Patrice
>
> "Luc" <(E-Mail Removed)> a écrit dans le message de
> news:(E-Mail Removed)...
>> Hi,
>>
>> i use objStreamWriter for writing data to an excel sheet.
>>
>> objStreamWriter = New StreamWriter(objFileStream)
>> objStreamWriter.WriteLine("title" & chr(9) & "name")
>> etc ...
>> This works perfect.
>> But is it also possible to give a cell a color, or to make the text sent
>> to a cell bold?
>> Thanks
>> Luc
>>

>



 
Reply With Quote
 
Patrice
Guest
Posts: n/a
 
      12-30-2009
Because for now it seems you are using a CSV likeformat
(http://en.wikipedia.org/wiki/Comma-separated_values) wiht tab rather than
comma as a delimiter.

If yes, this format only allows to define values to be imported and not how
the font or the cell should look like (so you'll have either to do this as
another step or use a format that allows to define both data and
appearance)...

--
Patrice


"Luc" <(E-Mail Removed)> a écrit dans le message de
news:(E-Mail Removed)...
> thanks for replying.
>
> Imagine all i want is to send "ok" but in bold.
> what do i have actually to change to this code for that?
> objStreamWriter = New StreamWriter(objFileStream)
> objStreamWriter.WriteLine("ok" )
> ...
> that's all i want to know.
> Thanks
>
>
> "Patrice" <http://scribe-en.blogspot.com/> schreef in bericht
> news:OnY$(E-Mail Removed)...
>> Hi,
>>
>> Which format do you use ?
>>
>> For now it seems you are using CSV which allows only to import data. If
>> you want to use formatting you could use HTML (Excel is able to import
>> HTML tables), XML (either the old xml format or what is now the native
>> format), use automation to control Excel (if client side)) or use a third
>> party product such as Aspose.Cells...
>>
>> Basically it seems you'll have to redesign how data are exported...
>>
>> --
>> Patrice
>>
>> "Luc" <(E-Mail Removed)> a écrit dans le message de
>> news:(E-Mail Removed)...
>>> Hi,
>>>
>>> i use objStreamWriter for writing data to an excel sheet.
>>>
>>> objStreamWriter = New StreamWriter(objFileStream)
>>> objStreamWriter.WriteLine("title" & chr(9) & "name")
>>> etc ...
>>> This works perfect.
>>> But is it also possible to give a cell a color, or to make the text sent
>>> to a cell bold?
>>> Thanks
>>> Luc
>>>

>>

>
>


 
Reply With Quote
 
 
 
Reply

Thread Tools

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
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Problem with Excel reports ::::Excel 2003 Migration To Excel 2007 =?Utf-8?B?c2hhc2hhbmsga3Vsa2Fybmk=?= ASP .Net 15 10-24-2007 01:34 PM
Choosing Layout: Css-Layout or Table-Layout hpourfard@gmail.com ASP .Net 1 06-19-2006 10:06 AM
Converting from grid layout to flow layout. RobertH ASP .Net 1 11-04-2003 12:43 AM
DataList inside a Grid Layout Panel (<DIV>) item layout problem Rick Spiewak ASP .Net 3 08-26-2003 04:22 AM



Advertisments