NetTalk Central

Author Topic: Office Excel 2007 Files  (Read 4182 times)

kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
Office Excel 2007 Files
« 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


Graham

  • Jr. Member
  • **
  • Posts: 57
    • View Profile
Re: Office Excel 2007 Files
« Reply #1 on: January 07, 2010, 10:35:47 PM »
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

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Office Excel 2007 Files
« Reply #2 on: January 07, 2010, 11:10:22 PM »
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