Universal Data Exporter ASP Support Product Page


Export to Excel - Overflow: 'CLng' - VBScript runtime error '800a0006'

Reported 20 Feb 2011 14:31:53
have this problem
20 Feb 2011 14:31:53 Gareth Tannatt Nash posted:
Development OS - Windows 7
Server OS - 2008
Dreamweaver Version CS3

When exporting to excel i get the following error

"Microsoft VBScript runtime error '800a0006'

Overflow: 'CLng'

\\\HOME\THESITE.COM\PUBLIC_HTML\SECURE\REPORTS\../../ScriptLibrary/ExcelWriter.asp, line 890"

My code is

<!--#include file="../../Connections/recruta2.asp" -->
<!--#include file="../../ScriptLibrary/dmxDataExporter.asp" -->
%Dim stats
Dim stats_cmd
Dim stats_numRows

Set stats_cmd = Server.CreateObject ("ADODB.Command")
stats_cmd.ActiveConnection = MM_recruta2_STRING
stats_cmd.CommandText = "SELECT   C.JBCLID ClientID,  C.JBCLName Client,          C.JBCLBillingContact Contact, C.JBCLPhone Phone,          C.JBCLEmail Email,  C.JBCLAccountType, C.JBCLAccountLive, C.JBCLCompanyType, CONVERT(CHAR(11),C.JBCLDateRegisterred,106) AS DateRegistered, FreeTrial, CONVERT(CHAR(11),C.JBCLMStartDate,106) AS StartDate, CONVERT(CHAR(11),C.JBCLMEndDate,106) AS Enddate, S.JBSURLShort from JBClient C inner join JBSite S on C.JBCLSiteID = S.JBSSiteID Where JBCLName NOT IN(select JBCLName from JBClient where JBCLID IN(Select JBAClientID from JBAdvert)) AND JBCLName NOT IN(select JBCLName from JBClient where JBCLID IN(Select JBAClientID from JBExpiredAdvert)) AND JBSSIteOwnerID <> '3' Group By JBCLID,JBCLName, JBCLBillingContact, JBCLPhone, JBCLEmail, JBCLAccountType, JBCLAccountLive, JBCLCompanyType,  JBCLDateRegisterred, FreeTrial, JBCLMStartDate, JBCLMEndDate, JBSURLShort" 
stats_cmd.Prepared = true

Set stats = stats_cmd.Execute
stats_numRows = 0
%' Universal Data Exporter ASP 1.11
' Type: excel
dim  ude1
Set ude1 = New dmxExcelExporter
ude1.ScriptFolder = "../../ScriptLibrary"
ude1.RowBgColor = "#DDEBFF"
ude1.EvenRowBgColor = "#FFFFFF"
ude1.LineSize = 0.3
ude1.LineColor = "#666666"
ude1.StripHtmlTags = true
ude1.UseHeader = true
ude1.HeaderFont = "helvetica"
ude1.HeaderFontColor = "#666666"
ude1.HeaderFontSize = 12
ude1.HeaderBgColor = "#88B8FF"
ude1.HeaderBold = false
ude1.HeaderItalic = false
ude1.HeadersOnAllPages = true
ude1.FontName = "helvetica"
ude1.FontSize = 12
ude1.FontColor = "#666666"
ude1.CellBold = false
ude1.CellItalic = false
ude1.TableRowHeight = 22
ude1.Download = true
ude1.SaveCopy = false
ude1.FileName = "JobBoard-Stats"
ude1.SourceRecordset = stats
ude1.SourceFieldsString = "Client,Client,220,L,L,0,T,Contact,Contact,100,L,L,0,T,Phone,Phone,100,L,L,0,T,Email,Email,100,L,L,0,T,JBCLAccountType,JBCLAccountType,100,L,L,0,T,JBCLAccountLive,JBCLAccountLive,100,L,L,0,T,JBCLCompanyType,JBCLCompanyType,100,L,L,0,T,DateRegistered,DateRegistered,100,L,L,0,T,FreeTrial,FreeTrial,100,L,L,0,T,StartDate,StartDate,100,L,L,0,T,Enddate,Enddate,100,L,L,0,T,JBSURLShort,JBSURLShort,100,L,L,0,T"

Set stats = Nothing

The Recordset containd 4500+ records

Please Help, I have a number of reports that i need to run.


Replied 21 Feb 2011 21:22:33
21 Feb 2011 21:22:33 Gareth Tannatt Nash replied:
Anyone? Please?
Replied 22 Feb 2011 11:33:43
22 Feb 2011 11:33:43 Miroslav Zografski replied:
Hello Gareth,

I have sent you an altered ExcelWriter.asp file on your e-mail. Please, substitute the one which is in your ScriptLibrary folder with it and try your export again.

Replied 22 Feb 2011 22:14:27
22 Feb 2011 22:14:27 Gareth Tannatt Nash replied:
Hello Miroslav,

Thank you, that appears to have resolved one issue, but now I get the following error -

<font face="Arial" size=2>
<p>Excel Writer</font> <font face="Arial" size=2>error 'ffffe0bf'</font>
<font face="Arial" size=2>Invalid color, color must be in the format #RRGGBB</font>
<font face="Arial" size=2>\\\HOME\THESITE.COM\PUBLIC_HTML\REPORTS\../ScriptLibrary/ExcelWriter.asp</font><font face="Arial" size=2>, line 157</font>

P[]lease help
Replied 23 Feb 2011 12:32:45
23 Feb 2011 12:32:45 Miroslav Zografski replied:
Hello Gareth,

Check your e-mail.

Replied 24 Feb 2011 23:18:45
24 Feb 2011 23:18:45 Gareth Tannatt Nash replied:

Thanks for the new code..

The plot thickens, now Firefox is trying to tell me the URL I have requested doesn't exist...

I knowv it does, have checked and deleted and re uploaded on several occasions...

Any idea why?

Replied 25 Feb 2011 10:07:38
25 Feb 2011 10:07:38 Miroslav Zografski replied:
Hello Gareth,

That is strange. Only thing I did is to extend the error text with a piece of information about the string that the function is trying to make a color.

Let me check it again and will get back to you.

Replied 10 Mar 2011 22:09:53
10 Mar 2011 22:09:53 guvenc ozkan replied:
I have the same problem.
my mail adress is

could you please help me to solve this problem

Overflow: 'CLng'

/ScriptLibrary/ExcelWriter.asp, line 890
Replied 17 Jun 2011 20:55:56
17 Jun 2011 20:55:56 shaun anderson replied:
Was there any resolution to this? I'm having the same error in version 1.14 but have now can back to version 1.12 whewre it works ok.....
Replied 31 Oct 2011 22:41:30
31 Oct 2011 22:41:30 Gary Cane replied:
I am getting the same error, can I get the fix?
Replied 09 Nov 2011 23:06:44
09 Nov 2011 23:06:44 Gary Cane replied:
Anyone......As it stands right now I would not buy this product.
Replied 07 Jan 2012 19:21:10
07 Jan 2012 19:21:10 David Thurston replied:
Just bought this extension and getting the same error.

Any resolution?

Not cheap and I want it working.
Replied 08 Feb 2012 15:40:32
08 Feb 2012 15:40:32 Steve Middleton replied:
I am also having this problem - is there any sign of a fix?
Replied 14 May 2012 21:20:05
14 May 2012 21:20:05 Johnathan Whitt replied:
Same error here. Please fix, I just purchased this Extension and it doesnt work as designed. Thanks

Microsoft VBScript runtime error '800a0006'

Overflow: 'CLng'

/ScriptLibrary/ExcelWriter.asp, line 890
Replied 16 May 2012 07:10:01
16 May 2012 07:10:01 Teodor Kuduschiev replied:
Hello All,

Please provide links to the pages you are having problems with.
Replied 20 Jun 2012 11:20:55
20 Jun 2012 11:20:55 shaun anderson replied:
Hi there,

Has this error been resolved as am getting exactly the same?

Microsoft VBScript runtime error '800a0006'

Overflow: 'CLng'

/ScriptLibrary/ExcelWriter.asp, line 890

Many thanks - Shaun
Replied 05 Sep 2012 10:14:17
05 Sep 2012 10:14:17 Felix Caballero replied:
I have the same problem.
my mail adress is

could you please help me to solve this problem

Overflow: 'CLng'

/ScriptLibrary/ExcelWriter.asp, line 890

Gracias por vuestra atención.
Saludos desde Barcelona, España
Replied 18 Oct 2012 21:00:56
18 Oct 2012 21:00:56 Joe Thrift replied:
Same problem here.

For me it occurs when I have a phone number with no dashes. i.e. for some reason it thinks it's a long number even though the fields are nvarchar. Other smaller numbers are ok. And like I said, if there is a dash in between the numbers everything is fine.

Someone on another thread suggested replacing CLng with CDbl. That allows the download to occur but the phone number changes in the download. For example, a test phone number 1234567890 in my database (MSSQL 2005) changed to 1154155218 in Excel(?)

Any solution out there? Looks like this has been an issue for a year.
Replied 06 Dec 2013 18:17:07
06 Dec 2013 18:17:07 Alejandro Mucino replied:
Can I get the fix too please ?
Replied 23 Jan 2014 21:10:07
23 Jan 2014 21:10:07 Joe Holt replied:
I need the fix as well.

Microsoft VBScript runtime error '800a0006'

Overflow: 'CLng'

/ScriptLibrary/ExcelWriter.asp, line 890

I am sure my proble is the same as Joe Thrift...phone numbers without dashes.
Replied 26 Jan 2014 20:38:05
26 Jan 2014 20:38:05 Alejandro Mucino replied:
I have the same issue, can you please send the fix to me as well ?

Replied 26 Jan 2014 21:09:12
26 Jan 2014 21:09:12 Joe Holt replied:
By the way, I solved this for now by adding in dashes to the phone number, but we still need the issue fixed as there are instances where I won't be able to do this. By the way, my field type in MS SQL is varchar.
Replied 26 Jan 2014 21:13:55
26 Jan 2014 21:13:55 Alejandro Mucino replied:
Mine are passports numbers, I cannot add dashes there, I need a fix please.
Replied 10 Apr 2014 18:38:53
10 Apr 2014 18:38:53 Jennifer Gibson replied:
Has there been a resolution to this problem.
Replied 10 Apr 2014 20:22:05
10 Apr 2014 20:22:05 Alejandro Mucino replied:
I don't see any solutions to this issue. We need a patch for this extension !
Replied 28 May 2014 16:53:16
28 May 2014 16:53:16 Bart Van Sichem replied:
I have the same error, please send me solution...

Reply to this topic