Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP Basics
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old April 16th, 2015, 02:22 AM
Registered User
Join Date: Apr 2015
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default ASP to Excel with formulas and different language versions


I am am trying to export a table created in HTML/Classic ASP to Excel, and with some help from the net I've managed to get almost to the end; see below.

However, I have a couple of obstacles that I need to pass.

How do I handle the Excel formulas in different languages? I am using an Excel with formulas in Swedish language, but obviously I cannot be sure my webpage users will all use the obscure Swedish Excel. Is there like a universal setup of Excel-formulas that will work in any language version? Or is there any other way around this dilemma?

Example: English formula "SUM" in Swedish is "SUMMA"

Also, every time I open up the file I get an error message saying that the file is not compatible with the file type. However the file opens fine. Would be nice to get rid of the errormessage though. How do I get rid of the error message?

<%@ Language=VBScript %>
<% option explicit
Response.ContentType = "application/vnd.ms-excel"
Response.AddHeader "content-disposition", "attachment; filename=exceltest.xls"
TD.excel_tabletop {
font-weight : bold;}

TD.excel_tablenormal {
font-weight : normal;
mso-number-format : 0\.0;}

TD.excel_tablebottom {
font-weight : bold;
mso-number-format : 0\.0;}


<TD CLASS='excel_tabletop'>&nbsp;</TD>
<TD CLASS='excel_tabletop'>Mon</TD>
<TD CLASS='excel_tabletop'>Tue</TD>
<TD CLASS='excel_tabletop'>Wed</TD>
<TD CLASS='excel_tabletop'>Thu</TD>
<TD CLASS='excel_tabletop'>Fri</TD>

<td CLASS='excel_tablenormal'>Week 1</td>
<td CLASS='excel_tablenormal'>5,3</td>
<td CLASS='excel_tablenormal'>7,9</td>
<td CLASS='excel_tablenormal'>8,2</td>
<td CLASS='excel_tablenormal'>-4,3</td>
<td CLASS='excel_tablenormal'>3</td>

<td CLASS='excel_tablenormal'>Week 2</td>
<td CLASS='excel_tablenormal'>3,3</td>
<td CLASS='excel_tablenormal'>7,2</td>
<td CLASS='excel_tablenormal'>8</td>
<td CLASS='excel_tablenormal'>-5,3</td>
<td CLASS='excel_tablenormal'>3,9</td>

<td CLASS='excel_tablenormal'>Week 3</td>
<td CLASS='excel_tablenormal'>4,3</td>
<td CLASS='excel_tablenormal'>5,9</td>
<td CLASS='excel_tablenormal'>8,6</td>
<td CLASS='excel_tablenormal'>4,3</td>
<td CLASS='excel_tablenormal'>-6,2</td>

<td CLASS='excel_tablebottom'>Total</td>
<td CLASS='excel_tablebottom'>=SUMMA(B2:B4)</td>
<td CLASS='excel_tablebottom'>=SUMMA(C2:C4)</td>
<td CLASS='excel_tablebottom'>=SUMMA(D2:D4)</td>
<td CLASS='excel_tablebottom'>=SUMMA(E2:E4)</td>
<td CLASS='excel_tablebottom'>=SUMMA(F2:F4)</td>


Last edited by guzz70; April 16th, 2015 at 04:05 AM..

Similar Threads
Thread Thread Starter Forum Replies Last Post
Versions of asp.net AlanWheeler BOOK: Beginning ASP.NET 4.5 : in C# and VB 3 March 6th, 2014 06:31 AM
Help with formulas billy1r Excel VBA 2 July 27th, 2011 09:14 AM
Formulas Juan0214 Access 4 July 2nd, 2008 02:04 PM
Using different ASP.NET versions rodmcleay ASP.NET 2.0 Professional 2 January 9th, 2006 10:12 PM
question on ASP.NET versions joef ASP.NET 1.0 and 1.1 Basics 0 October 24th, 2005 01:22 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.