I've had it resolved.
For those who may use this in the future. I use Spreadsheet1_CommandBeforeExecute(Command, Cancel) event handler, and set Cancel.Value = True to bypass the automatic export. Then I do a Spreadsheet1.Export myfolder & myfilename
I created spreadsheet on my web page using Office Web Component.
When I press 'Export' commmand on the OWC Spreadsheet to export it to Excel, it automatically assigns a file name with an XML extension, I wonder how and if I can manually assign a file name and an extension I want for the export...
I tried with your example, then modified a bit (I use Cells, instead of Range during the 1st copy):
With SS1.ActiveSheet
For i = 0 To adoRsB.Fields.Count - 1
.Cells(1,i+1).Value = adoRsB.Fields(i).Name
Next
.Cells.copyFromRecordset adoRsB
LastRow = adoRsB.RecordCount + 1...
Thanks for the quick answer.
I guess I understand the concept, but can't tranlate it into actual codes - or make it to work right.
I can copy the 1st recordset successfully, and find the last row, but when I copy the 2nd recordset, the previous load disappears from the spreadsheet. What's the...
I am trying to use copyFromRecordset to fill one single spreadsheet with TWO separate SQL recordsets.
How do I do this? Or can I do this at all? Thanks.
I am trying to fill one spreadsheet with 2 SQL queries on my web page.
Usually, I used copyFromRecordset to fill the spreadsheet. But with 2 separate SQL queries, it seems to be not working right - it only fills the sheet with the last query.
I wonder what's the right way to do this?
I know I...
This seems to delete cell by cell for all the worksheets in a workbook (I have workbook with 10-20 worksheets)? Is this the best way?
I was hoping to initialize/empty workbook in one single lazy code? =), or at least empty worksheet by worksheet thru a loop or something?
I am using copyFromRecordset (something like this:
SS1.ActiveSheet.Cells.copyFromRecordset adoRs, 3000
to fill my spreadsheet with results from a SQL query. How do I continue to fill this same spreadsheet with results from another query?
Thanks.
I am using client-side VBScript to get it work, seemingly bypassing the IIS issue related to IUSR account.
But I am experiencing another issue related to DTS execution: after the DTS is done, the destination table involved seems to be "locked" still - even though, I have issued "Uninitialize"...
With more testing on this problem...
It does seem to me that the table involved in the DTS execution is still being 'locked' after the DTS completes. I can't do any SQL operation on it, not even SELECT.
What else I need to do other than "UnInitialize" in my ASP code?
Hi, all,
Please confirm if this is true.
I clear the destination table outside the DTS before I run a simple DTS package from an ASP page, then I check the destination table's row count to see if the DTS has completed successfully.
However, this execution of the simple SQL stored procedure...
For now, I use the client-side VBScript to execute the DTS package. I don't specify the username and password, since I use NT authentication. This is a very limited and restricted intranet applcation and it works - so far.
By doing this, I think I bypass the IIS issues that seem to related to...
No, I had tried that with username and password, but same result.
I am focusing on the fact that "this is running within the security context of IIS", and I think it has something to do with setting up "IUSR_servername" login for SQL Server. But I don't know the detail of this yet.
I am new to IUSR stuffs.
I was told to create new login ID to SQL Server using 'IUSR_machinename' so that my ASP page can do some works with SQL Server.
However, after I click the "New Login", I can't seem to be able to find "IUSR_machinename".
Does anyone know why?
I am trying to run DTS Package from ASP 3.0 with the following codes:
Set objDTSPackage = server.CreateObject("DTS.Package")
objDTSPackage.LoadFromSQLServer "serverName", "", "", 256,,,,"pkgName"
objDTSPackage.FailOnError = true
objDTSPackage.Execute
It failed with this message, "Package...
Hi, All,
I have my IIS Web server and SQL Server installed in one machine.
However, when I use a simple ASP code
<%Set objDTS = Server.CreateObject("DTS.Package")%>it comes back with "424: Object Required" error. I thought I should have no problem at least doing CreateObject using...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.