NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: kevin plummer on January 04, 2010, 08:00:40 PM
-
Hi All,
Is there something special I need to do with Excel 2007 xlsx files?
I have just made the file name the URL.
When I try to open them they just open in the FF web browser as Gibberish - it does not give me a chance to save the file. Excel 2003 files open fine.
I don't actually have Excel 2007 on my pc only 2003 and the conversion program from MS so I can open them in 2003.
Cheers,
Kev
-
Hi Kevin,
May be an issue with Content type not being set correctly.
Try the following in your WebHandler procedure, in the p_web._GetContentType embed, AFTER parent call:
x# = instring ('xlsx', p_Filename, 1, 1)
if x#<>0 then
Returnvalue = 'application/vnd.ms-excel'
end
This is quick and crude so not sure what the implications are down the line.
You may want to tweak the _GetContentType source itself (share with Bruce of course). In Netweb.clw in your \clarion\libsrc folder, at around line 4501 (nettalk 4.37):
of 'xlc'
orof 'xll'
orof 'xlm'
orof 'xls'
orof 'xlsx' ! <-- ADD THIS LINE
orof 'xlw'
orof 'csv'
return ('application/vnd.ms-excel')
hth
Graham
-
orof 'xls'
orof 'xlsx' ! <-- ADD THIS LINE
I've done this for the next NT5 release, so it's safe to add to your netweb.clw there.
cheers
Bruce