Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

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

6 views
Skip to first unread message

Luc

unread,
Dec 29, 2009, 1:32:36 PM12/29/09
to
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


Patrice

unread,
Dec 29, 2009, 3:45:22 PM12/29/09
to
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" <dr...@sxxx.nl> a �crit dans le message de
news:e6LKMVLi...@TK2MSFTNGP06.phx.gbl...

Luc

unread,
Dec 29, 2009, 4:26:53 PM12/29/09
to
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$XfMiKH...@TK2MSFTNGP06.phx.gbl...

Patrice

unread,
Dec 30, 2009, 8:01:57 AM12/30/09
to
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" <dr...@sxxx.nl> a �crit dans le message de

news:eRV2l2Mi...@TK2MSFTNGP04.phx.gbl...

0 new messages