SmartShark
New member
- Local time
- 4:12 AM
- Messages
- 3
I am facing the following interesting situation.
I have an excel file with many columns. One column contains line numbers (for example 3150).
I want to set up hyperlinks, such that when the user clicks on one of the cells in the Line Number column, a batch program is called with the line number as its command line argument, so that the source file is opened at the specific line number.
I was able to set up a hyperlink without any command line arguments for one cell, but then I had to set the value explicitly in the batch file as follows -
So this batch file opens the "sourcefile.txt" at line number 3150 in the Notepad++ editor. However, it's not practical to write a separate batch file for every such line number in the excel sheet. So I am wondering if it is possible to somehow pass the line number as an argument to the batch program.
I have an excel file with many columns. One column contains line numbers (for example 3150).
Code:
Source Line Number
if(this.getValue()==0) 3150
for(i=0;i<value;i++) 3175
while(true) 3200
... ...
I was able to set up a hyperlink without any command line arguments for one cell, but then I had to set the value explicitly in the batch file as follows -
Code:
cd "%~dp0"
notepad++ sourcefile.txt -n3150
My Computer
At a glance
Windows 7 Professional 64 bit
- OS
- Windows 7 Professional 64 bit