473,624 Members | 2,577 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Read hyperlink in excel sheet in VB.net

I have an excel sheet that have one of its cells as a hyperlink

I need to read this cell through Vb.net and get the value of the hyperlink
(the whole path ex: \\c:\document\. .... ..... ... .. , not only the cell
content)

how can I do that

thanks for help
Jul 21 '05 #1
3 7318
Hi Zino,

First of all, I would like to confirm my understanding of your issue. From
your description, I understand that you need to get the hyperlink in an
Excel cell in VB.NET. If there is any misunderstandin g, please feel free to
let me know.

As far as I know, when we have filled data from an Excel worksheet to a
.NET DataSet, all the values for this kind of field have been converted to
string type. Then, we cannot figure out which part is the hyperlink. Do you
have other contents in the same cell with the hyperlink which prevent you
from figuring it out?

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Jul 21 '05 #2
Hi Zino,

First of all, I would like to confirm my understanding of your issue. From
your description, I understand that you need to get the hyperlink in an
Excel cell in VB.NET. If there is any misunderstandin g, please feel free to
let me know.

As far as I know, when we have filled data from an Excel worksheet to a
.NET DataSet, all the values for this kind of field have been converted to
string type. Then, we cannot figure out which part is the hyperlink. Do you
have other contents in the same cell with the hyperlink which prevent you
from figuring it out?

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Jul 21 '05 #3
Hi,

I think we may try to read the Hyperlinks by using automation.
The code below will print the cell(b5)'s hyperlink address and displayed
text.

Dim ex As New Excel.Applicati onClass
ex.Workbooks.Op en("C:\temp\boo k1.xls")
Dim sheet As Excel.Worksheet = ex.ActiveSheet
Dim rg As Excel.Range = sheet.Cells(5, 2)
Debug.WriteLine (rg.Hyperlinks( 1).Address)
Debug.WriteLine (rg.Hyperlinks( 1).TextToDispla y)
ex.Quit()
You may have a try and let me know if that is what you want.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

Jul 21 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
35522
by: Allison Bailey | last post by:
Hi Folks, I'm a brand new Python programmer, so please point me in the right direction if this is not the best forum for this question.... I would like to open an existing MS Excel spreadsheet and extract information from specific worksheets and cells. I'm not really sure how to get started with this process. I ran the COM Makepy utility from my PythonWin (IDE from ActiveSTate),
3
1519
by: zino | last post by:
I have an excel sheet that have one of its cells as a hyperlink I need to read this cell through Vb.net and get the value of the hyperlink (the whole path ex: \\c:\document\..... ..... ... .. , not only the cell content) how can I do that thanks for help
4
5832
by: Marco Aschwanden | last post by:
Hi I would like to 1. import an existing Excel-sheet (a template) 2. and add some data to it 3. and save it under a different name afterwards. To me it seems, that pyExcelerator does not support the reading for modification of an Excel-sheet. It allows only the "parse_xls" but I would like to keep the "formatting" in the template.
12
6011
by: kath | last post by:
How do I read an Excel file in Python? I have found a package to read excel file, which can be used on any platform. http://www.lexicon.net/sjmachin/xlrd.htm I installed and working on the examples, I found its printing of cell's contents in a different manner. print sh.row(rx)
1
4815
by: tanilov | last post by:
Hi all, I need to read data from an excel file and populate a dataset. After some search I found following code: connString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + filename.ToString() + ";Extended Properties=\"Excel 8.0;HDR=YES;\""; DataSet myDataSet = new DataSet();
2
1824
by: fluff | last post by:
Hello Is there a way to connect to an excel file and just display a certain chart or graph or sheet? I can make a hyperlink to the excel and open the whole thing, but it would be nice to just open one sheet. I can copy and paste a graph onto frontpage and update the webpage every week, but I just thought it would be nicer if people can always see the current data and I don't feel like updating it like that. Does anyone have a...
1
1519
by: fluff | last post by:
Hello I'm not sure if this is not the right forum for this question so sorry if it is not (I was just told at the html forum to try a different forum) Is there a way to connect to an excel file and just display a certain chart or graph or sheet? I can make a hyperlink to the excel and open the whole thing, but it would be nice to just open one sheet. I can copy and paste a graph onto frontpage and update the webpage every week, but I...
5
15917
by: tsanthoshk | last post by:
Hi All I am trying to read and modify input excel file. when i update the data in excel sheet already existing format is washing out. It mean if excel sheet contain colors those are not appearing once i update. Can any one suggest links or scripts for this problem. Requirement: input excel sheet will be given. Read the data and modify with new the data. And the condition is excel sheet contain colors which should not be distrub. ...
1
2245
ammoos
by: ammoos | last post by:
Hi Friends I need to read data from excel sheet. The issue is that the first few rows of the excel sheet are images and buttons...and the data I need to read is start from the 6th row. And also the column names are dates... I tried oledb object to read data but it’s not worked since the data in the excel sheet are not in the table format... shall I read the data from excel row by row? Is there any solution for my...
0
8249
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8179
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8685
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8348
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6112
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4084
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2613
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1797
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1493
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.