Designing web pages for Excel Web Queries
by Chris Miller » Fri, 10 Oct 2003 03:07:18 GMT
I'm running a website with ColdFusion MX and I've got
account numbers on reports with leading zeros. When I
export spreadsheets from Coldfusion the leading zeros are
stripped out. Is there any html formating that would tell
Excel to keep the leading zeros?
Re: Designing web pages for Excel Web Queries
by Jake Marx » Fri, 10 Oct 2003 03:18:19 GMT
Hi Chris,
You can learn a lot from saving an Excel workbook or sheet as an HTML
document. Excel puts all sorts of XML attributes in the HTML tags that tell
Excel what to do when opening them.
This HTML source will produce a numeric value in cell A1 = 1 and a string in
cell A2 = 0001.
<html xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns=" http://www.**--****.com/ ">
<head>
<title>Test</title>
</head>
<body>
<table>
<tr>
<td height=17 width=64 x:num>001</td>
</tr>
<tr>
<td x:str="'00001">00001</td>
</tr>
</table>
</body
</html>
So it looks like you can use x:str to specify that Excel should treat the
cell as a string. If you give that attribute a value, I think Excel will
use that value instead of what's displayed in the HTML output. In this
case, I put a single quote in front of the string so Excel won't reevaluate
the string as a number when you edit it.
--
Regards,
Jake Marx
www.longhead.com
Re: Designing web pages for Excel Web Queries
by Jake Marx » Fri, 10 Oct 2003 04:13:22 GMT
Chris,
Do the XML schema-related statements appear in the HTML tag? Because the
HTML code below opens perfectly for me in Excel (Win XP, Excel 2002).
--
Regards,
Jake Marx
www.longhead.com
Re: Designing web pages for Excel Web Queries
by Chris Miller » Fri, 10 Oct 2003 04:55:58 GMT
Jake,
Even with the schema statements it doesn't see the cell as
text. Excel 2000. That extra 2 makes all the difference
apparently. I might just do this as an Excel macro
instead. Thanks for your help.
tag? Because the
Excel 2002).
it
sheet as an HTML
the HTML tags
A1 = 1 and a
Excel should
attribute a value, I
displayed in the
front of the
number when you
are
tell
Similar Threads:
1.Web Queries and how Excel sees the "selected box" on the web page
2.Web query application - downloading ".shtml" web page to excel workbook
3.GIF image on web-page corrupts data fetched with Web Query
I have an Excel workbook that is designed to fetch data from a web
page via a Web Query, that is invoked from a macro. The web pages
concerned have small GIF images about the size of the text font
floating near some of the text (as a substitute for an asterisk, it
seems). These symbols appear to corrupt the data which the Web Query
fetches- a variable amount of following data is lost.
How can I avoid this? It seems, for instance, that there might be a VB
command which will cause these GIF images to be ignored. Typical macro
script that invokes the query is:
Sheets("ALBE").Select
Range("A26").Select
With ActiveSheet.QueryTables.Add(Connection:= _
"FINDER;C:\QLDVTR\Queries\TESTIQY\TESTALBE.IQY", _
Destination:=Range("A26"))
.Name = "ALBE"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = False
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlOverwriteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = False
.RefreshPeriod = 0
.WebSelectionType = xlAllTables
.WebFormatting = xlWebFormattingAll
.WebPreFormattedTextToColumns = False
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.Refresh BackgroundQuery:=False
End With
Where the IQY file contains the web address
Is there something in the truth table which can be altered, or is
there something I can add to achieve what I want.
This problem occurs with Excel2003 and Excel2002
Thanks
Geoff Lambert
4.Web Query - additional web pages
Hi,
Does anyone know how to import data from a website that has numerous page
containing relevant data?
e.g. searching for a particular item, the website show 10 pages that have
the relevant item, I want to import dat from each of those 10 pages?
Thanks
5.web query 2003 returns no data from some web pages
Some web pages return no data for example the top ten stocks for this month
from MSN stocks lists
Can anyone say why? Other queries from other pages work fine?
Appreciate any help
Dianne Zinky
6. Web Query not downloading data filtered in web page
7. Saving Excel 2010 files as web page or single file web page
8. Web query: Want to pause macro while Web query completes refreshin