/    Sign up×
Community /Pin to ProfileBookmark

excel and html

Is it possible to show a particular excel tab from a link. Let’s say I have an excel spreadsheet with three tabs and I have a web page with three links. I would like each link to open the excel spreadsheet and go to a particular tab on the spreadsheet. Is this possible and how can it be done.

Thanks for any help

to post a comment
HTML

11 Comments(s)

Copy linkTweet thisAlerts:
@saeMay 29.2007 — create your excel spreadsheet (with the sheet tabs) go to file->save as web page. Everything will be there.
Copy linkTweet thisAlerts:
@hcraig4authorMay 29.2007 — Thanks, but how can I make it so that a link goes to a particular tab?
Copy linkTweet thisAlerts:
@kiwibritMay 29.2007 — <i>
</i>&lt;a href="test.xls#Sheet2"&gt;sheet 2&lt;/a&gt;

will link to an Excel file (in the same directory as you html one) called test.xls and with a tab called Sheet2.

BUT unless you are using this for intranet purposes, where you know your page users will have Excel installed, consider not doing it. Any visitor would need Excel (or a program genuinely capable of loading Excel) installed in his/her computer.
Copy linkTweet thisAlerts:
@saeMay 29.2007 — I don't think that can be done easily because the excel is inserted as a javascript object and not as HTML. I don't know much about javascript, but there is a function that handles which tab is being displayed. Not sure if there would be a way to pass a variable via the url that would allow you to "jump" to a certain tab by using the URL variable to go to a specific tab. You might be better off posting in the javascript forum (or asking a moderator to move this there)
Copy linkTweet thisAlerts:
@kiwibritMay 29.2007 — I don't think that can be done easily because the excel is inserted as a javascript object and not as HTML. I don't know much about javascript, but there is a function that handles which tab is being displayed. Not sure if there would be a way to pass a variable via the url that would allow you to "jump" to a certain tab by using the URL variable to go to a specific tab. You might be better off posting in the javascript forum (or asking a moderator to move this there)[/QUOTE]

Nope. My code is not javascript. It is an html link with an anchor (#Sheet2) taking it to the Excel sheet tab.
Copy linkTweet thisAlerts:
@saeMay 29.2007 — but if you "save as web page" it will save it as javascript
Copy linkTweet thisAlerts:
@kiwibritMay 29.2007 — but if you "save as web page" it will save it as javascript[/QUOTE]

Ah, I thought you were replying to me rather than carrying on with your own thought. Yes, saving an excel file as a web page does result in javascript, will produce coding errors, will rely on the user having javascript enabled and Excel (or an Excel compatible program) installed. Not recommended for general use.
Copy linkTweet thisAlerts:
@hcraig4authorMay 29.2007 — Thanks guys, It is going on an intranet. I'll give that a try.

Thanks again
Copy linkTweet thisAlerts:
@hcraig4authorMay 30.2007 — I tried <a href="test.xls#Sheet2">sheet 2</a>

and got an error message

"Reference is not valid"

Any suggestions

thanks
Copy linkTweet thisAlerts:
@saeMay 30.2007 — can you link directly to the file on the network then? like this:
<i>
</i>&lt;a href="w:network_pathfile.xls#2"&gt;Open File&lt;/a&gt;

I believe that might work better for you
Copy linkTweet thisAlerts:
@kiwibritMay 30.2007 — I tried <a href="test.xls#Sheet2">sheet 2</a>

and got an error message

"Reference is not valid"

Any suggestions

thanks[/QUOTE]

Is the excel file in the same folder as our html page? If not, see sae's post
×

Success!

Help @hcraig4 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.15,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...