excel output from c#

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,
In my windows app. I send the result of sp to excel sheet. It has siz column.
My problem is, I want to make the text in a column to hyperlink. How ca nI
do this when I am sending the info to excel.

thanks,
 
Banu_tr,

I assume that you are already accessing Excel through automation. What
you have to do is go to each cell that you want to create a hyperlink in
(getting the Range for it), and then calling the Add method on the
Hyperlinks property exposed for that range. This will allow you to specify
the address to go to, etc, etc.

Hope this helps.
 
Hi,

I don't want to add the hyperlink when I alrealdy create the excel file.
In my program I run the sp, and return the results to excel file. But when
I am sending to excel I want to format the rows of one coloumn as hyperlink.
Thanks,
Banu
--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Banu_tr said:
Hello,
In my windows app. I send the result of sp to excel sheet. It has siz
column.
My problem is, I want to make the text in a column to hyperlink. How ca nI
do this when I am sending the info to excel.

thanks,
 
Hi,

I am using my C# programs to create Excel files by writing in a file
tab separated values. But as you can imagine I can only write text. I
am interested in doing a lot more with excel (Writing formated text,
reading excel files). Can you help me? What is this automation?


John Arthur
 
I think you should define some extra data in the SQL recordset that is
returned, either as extra columns or as codes within the data, that your
program intercepts and thus knows what hyperlinks to create. It then uses
Excel automation methods to insert the appropriate hyperlinks using the
method the first replyer suggested.
 
Back
Top