Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   HTML (http://www.velocityreviews.com/forums/f31-html.html)
-   -   download spreadsheet (http://www.velocityreviews.com/forums/t754093-download-spreadsheet.html)

mcnewsxp 09-15-2011 02:54 PM

download spreadsheet
 
can i download a spreadsheet from an HTML page? click a link and the csv open in excel?
tia,
mike

Neil Gould 09-15-2011 03:03 PM

Re: download spreadsheet
 
mcnewsxp wrote:
> can i download a spreadsheet from an HTML page? click a link and the
> csv open in excel? tia,
> mike
>

Sure... go ahead, I don't mind! ;-)

Google: html table to excel

--
Neil




mcnewsxp 09-15-2011 03:09 PM

Re: download spreadsheet
 
dumb question. no problem.

Denis McMahon 09-15-2011 08:27 PM

Re: download spreadsheet
 
On Thu, 15 Sep 2011 07:54:05 -0700, mcnewsxp wrote:

> can i download a spreadsheet from an HTML page? click a link and the
> csv open in excel? tia,


Wrong question.

What a web browser does with a document will depend on a couple of things:

a) What type of document the web browser thinks it is getting (which
might be based on the mime type the server tells it, or the file
extension, or both, prioritising one over the other in the latter case).

b) What the browser is configured to do with that type of document, which
might be some browser default value, user configured, determined by other
installed software, decided by the operating system, save the file or to
ask the user.

Note that (a) above might in turn rely on the configuration of the web
server as to what metadata it sends in relation to given file types,
which it might in turn identify by the file extension or by other means.

Rgds

Denis McMahon


mcnewsxp 09-19-2011 01:16 PM

Re: download spreadsheet
 
right. is there any way to ensure the browser gets it right with HTML?

Allodoxaphobia 09-19-2011 02:53 PM

Re: download spreadsheet
 
On Mon, 19 Sep 2011 06:16:59 -0700 (PDT), mcnewsxp wrote:
> right. is there any way to ensure the browser gets it right with HTML?


*What* are you nattering on about?

Oh, sigh, I see: User-Agent: G2/1.0

Jonathan N. Little 09-19-2011 03:25 PM

Re: download spreadsheet
 
mcnewsxp wrote:
> right. is there any way to ensure the browser gets it right with HTML?


1) Learn to quote

2) No

<a href="some.xls">A spreadsheet</a>

As you have been told what happens when someone clicks the above depends on
a) how the *user* has his browsers configured to handle XLS files
b) what software the *user* has installed on *his* system.


You cannot with HTML override a or b. If the user has it setup to
download XLS files only you cannot force him to open it directly in
Excel. Also if the user does not have Excel you cannot force him to
install it.


--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com

Denis McMahon 09-19-2011 04:43 PM

Re: download spreadsheet
 
On Mon, 19 Sep 2011 06:16:59 -0700, mcnewsxp wrote:

> right. is there any way to ensure the browser gets it right with HTML?


If you control the server, you can at least control how the server
presents the file. i.e. the headers.

However, unless you control the browser configuration, you can not
control how the browser handles the mime type / file type.

That element of browser configuration is usually outside of what you can
control from a web page, for good reason.

If I could control what your browser did when I sent a specific file to
it, I could install any software I wanted on your computer. Thank you for
your banking details, please wait while I transfer all the funds from
your bank to my bank, welcome to my botnet.

Rgds

Denis McMahon

mcnewsxp 09-20-2011 01:16 PM

Re: download spreadsheet
 
"2) No"

thanks

Jonathan N. Little 09-20-2011 04:09 PM

Re: download spreadsheet
 
mcnewsxp wrote:
> "2) No"
>
> thanks


The basic rule of HTML, and web design in general: you can only suggest
and not force anything on the user. (Hopefully it will stay that way,
power to the people and all...)

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com


All times are GMT. The time now is 03:15 PM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57