RE: COM help - Correction

2002-09-30 Thread Dave Wilson

Brian,

Sorry I've screwed up in my advice to you. I've suddenly remembered that my
problems were down to attempting to use excel as a datasource, with an
insert, then subsequent read of the newly calculated value. This resulted in
similar symptons to your problem, whereby it worked first time round but
subsequent calls simply returned a cached result.

Using COM to do the insert was my workaround to the problem, plus I used the
disable dbconnections commands as an extra measure on the datasource before
invoking a DTS package in SQL 7 to retrieve and record the relevant result.
In which case the placement of the tags are actually BEFORE calling the
sheet (as a datasource) with the DTS package.

Your problem is that you appear to be experiencing excel locking up even
when connecting via COM in the custom tag. I suspect you dont even have the
sheet set up as a datasource.

Sorry to have confused you,
Dave

-Original Message-
From: Brian Ferrigno [mailto:[EMAIL PROTECTED]]
Sent: 30 September 2002 17:48
To: CF-Talk
Subject: RE: COM help


Hi Dave,

Sorry about being a pest but where exactly do you have to place the code you
described below? I placed it after the call to the custom tag that creates
the csv file. Does it need to be before or wrap around the call?


>



Thank you very much for the help.


Brian

-Original Message-
From: Dave Wilson [mailto:[EMAIL PROTECTED]]
Sent: Monday, September 30, 2002 12:13 PM
To: CF-Talk
Subject: RE: COM help


Brian,

Although I've experienced pretty much what you describe, I've never seen the
process actually killing the CF Service itself.

To fix the problem of inactivity in the excel part of the process on
subsequent attempts, use the following:




Which should help to kill any locked connections to the sheet.

HTH,
Dave

-Original Message-
From: Brian Ferrigno [mailto:[EMAIL PROTECTED]]
Sent: 30 September 2002 16:40
To: CF-Talk
Subject: COM help


I need help tracking down an error in using CFOBJECT to create a csv file
from an excel spreadsheet.

I am using CF to open up an excel spreadsheet and then trying to turn the
data into a csv file. The code i'm using works fine the first time the
application is launched but on subsequent tries nothing happens. According
to the company hosting my site COM is causing the CF service to fail then it
has to be restarted. I'm listing the code i'm using below.

Is this an issue with a patch needing to be installed or a problem with the
code below? Any help would much appreciated. Thanks.


-Brian


Stats
--
CF version CF5.0
IIS
Windows 2K server

Code




  


  
  Cannot create Excel Object
  
  

  






// this code will open up the excel spread sheet and then save it as a CSV
file.

// HTML file path
ExcelFilePath = "#attributes.excelFileIn#";

// Destination path for new Word document
// We leave off the extension since we'll declare the file type later on
CSVFilePath = "#attributes.CSVFileOut#";

// Open Word in the background
objExcel.Visible = false;

// Disable alerts such as: 'Save this document?'
objExcel.DisplayAlerts = false;

// Get the 'Documents' collection
objBooks = objExcel.workbooks;

// Open the HTML document
objBook = objBooks.Open(ExcelFilePath);

// Get the sheets collection
objSheets = objBook.WorkSheets;

// Get the first sheet
objSheet = objSheets.Item(Val(1));

// Get a named sheet
objSheet = objSheets.Item("#attribtues.sheetName#");


/* Save it as a new document -- the extension will automatically
   be appended based on the file type we choose.
   Some of the file types to convert to:
   1 = .xls
   3 = .txt (tab delimetered
   6 = .csv
*/
objSheet.SaveAs(CSVFilePath, Val(6));

// The next line would convert it to RTF instead
// objSpreadSheet.SaveAs(CSVFilePath,Val(6));

// Close the document
objBook.Close();

// Quit Word
objExcel.Quit();

if (attribtues.showConfirmation EQ 1) {
writeOutput("File Created:
""#attributes.CSVFileOut#"" from file:
""#attributes.excelFileIn#""");
}


  
  
  there was
an error creating your new CSV filesfrom your Excel Spreadsheet
  




__
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: COM help

2002-09-30 Thread Dave Wilson

No problem at all Brian :)

I too have the code placed at the end of my COM-related code. I've just
noticed, however that you are using the cf_excel2csv tag, which should
render the code redundant (although there's no harm in leaving it there).

I've pasted some code below for you to look at:







  


  



// Get the workbooks collection //
objBooks = objExcel.Workbooks;

// Open and activate the workbook //
objBook = objBooks.Open(File);
objBook.Activate();

// Get the sheets collection //
objSheets = objBook.WorkSheets;

// Get a named sheet //
objSheet = objSheets.Item("apr");

// Create the range and copy the records from ADO //
objRange = objSheet.Range("B2:B2");
objRange.Value=#quotation.term#;
objRange = objSheet.Range("C2:C2");
objRange.Value=-#monthlyadj#;
objRange = objSheet.Range("D2:D2");
objRange.Value=#loan_amt#;
objRange = objSheet.Range("E2:E2");
objRange.Value=#quotation.apr#/100;


// Save the file //
objSheet.SaveAs(File, Val(1));

// Kill the ADO and Excel objects //
objBook.Close();




--

In your case the custom tag is the wrapper for the cfscript part of my code.
Note mine doesn't convert to csv. The code above is used for initiating a
successive approximation within excel calculating APR for a loan.

HTH,
Dave

-Original Message-
From: Brian Ferrigno [mailto:[EMAIL PROTECTED]]
Sent: 30 September 2002 17:48
To: CF-Talk
Subject: RE: COM help


Hi Dave,

Sorry about being a pest but where exactly do you have to place the code you
described below? I placed it after the call to the custom tag that creates
the csv file. Does it need to be before or wrap around the call?


>



Thank you very much for the help.


Brian

-Original Message-
From: Dave Wilson [mailto:[EMAIL PROTECTED]]
Sent: Monday, September 30, 2002 12:13 PM
To: CF-Talk
Subject: RE: COM help


Brian,

Although I've experienced pretty much what you describe, I've never seen the
process actually killing the CF Service itself.

To fix the problem of inactivity in the excel part of the process on
subsequent attempts, use the following:




Which should help to kill any locked connections to the sheet.

HTH,
Dave

-Original Message-
From: Brian Ferrigno [mailto:[EMAIL PROTECTED]]
Sent: 30 September 2002 16:40
To: CF-Talk
Subject: COM help


I need help tracking down an error in using CFOBJECT to create a csv file
from an excel spreadsheet.

I am using CF to open up an excel spreadsheet and then trying to turn the
data into a csv file. The code i'm using works fine the first time the
application is launched but on subsequent tries nothing happens. According
to the company hosting my site COM is causing the CF service to fail then it
has to be restarted. I'm listing the code i'm using below.

Is this an issue with a patch needing to be installed or a problem with the
code below? Any help would much appreciated. Thanks.


-Brian


Stats
--
CF version CF5.0
IIS
Windows 2K server

Code




  


  
  Cannot create Excel Object
  
  

  






// this code will open up the excel spread sheet and then save it as a CSV
file.

// HTML file path
ExcelFilePath = "#attributes.excelFileIn#";

// Destination path for new Word document
// We leave off the extension since we'll declare the file type later on
CSVFilePath = "#attributes.CSVFileOut#";

// Open Word in the background
objExcel.Visible = false;

// Disable alerts such as: 'Save this document?'
objExcel.DisplayAlerts = false;

// Get the 'Documents' collection
objBooks = objExcel.workbooks;

// Open the HTML document
objBook = objBooks.Open(ExcelFilePath);

// Get the sheets collection
objSheets = objBook.WorkSheets;

// Get the first sheet
objSheet = objSheets.Item(Val(1));

// Get a named sheet
objSheet = objSheets.Item("#attribtues.sheetName#");


/* Save it as a new document -- the extension will automatically
   be appended based on the file type we choose.
   Some of the file types to convert to:
   1 = .xls
   3 = .txt (tab delimetered
   6 = .csv
*/
objSheet.SaveAs(CSVFilePath, Val(6));

// The next line would convert it to RTF instead
// objSpreadSheet.SaveAs(CSVFilePath,Val(6));

// Close the document
objBook.Close();

// Quit Word
objExcel.Quit();

if (attribtues.showConfirmation EQ 1) {
writeOutput("File Created:
""#attributes.CSVFileOut#"" from file:
""#attributes.excelFileIn#""");
}


  
  
  there was
an error creating your new CSV filesfrom your Excel 

RE: COM help

2002-09-30 Thread Brian Ferrigno

Hi Dave,

Sorry about being a pest but where exactly do you have to place the code you
described below? I placed it after the call to the custom tag that creates
the csv file. Does it need to be before or wrap around the call?


>



Thank you very much for the help.


Brian

-Original Message-
From: Dave Wilson [mailto:[EMAIL PROTECTED]]
Sent: Monday, September 30, 2002 12:13 PM
To: CF-Talk
Subject: RE: COM help


Brian,

Although I've experienced pretty much what you describe, I've never seen the
process actually killing the CF Service itself.

To fix the problem of inactivity in the excel part of the process on
subsequent attempts, use the following:




Which should help to kill any locked connections to the sheet.

HTH,
Dave

-Original Message-
From: Brian Ferrigno [mailto:[EMAIL PROTECTED]]
Sent: 30 September 2002 16:40
To: CF-Talk
Subject: COM help


I need help tracking down an error in using CFOBJECT to create a csv file
from an excel spreadsheet.

I am using CF to open up an excel spreadsheet and then trying to turn the
data into a csv file. The code i'm using works fine the first time the
application is launched but on subsequent tries nothing happens. According
to the company hosting my site COM is causing the CF service to fail then it
has to be restarted. I'm listing the code i'm using below.

Is this an issue with a patch needing to be installed or a problem with the
code below? Any help would much appreciated. Thanks.


-Brian


Stats
--
CF version CF5.0
IIS
Windows 2K server

Code




  


  
  Cannot create Excel Object
  
  

  






// this code will open up the excel spread sheet and then save it as a CSV
file.

// HTML file path
ExcelFilePath = "#attributes.excelFileIn#";

// Destination path for new Word document
// We leave off the extension since we'll declare the file type later on
CSVFilePath = "#attributes.CSVFileOut#";

// Open Word in the background
objExcel.Visible = false;

// Disable alerts such as: 'Save this document?'
objExcel.DisplayAlerts = false;

// Get the 'Documents' collection
objBooks = objExcel.workbooks;

// Open the HTML document
objBook = objBooks.Open(ExcelFilePath);

// Get the sheets collection
objSheets = objBook.WorkSheets;

// Get the first sheet
objSheet = objSheets.Item(Val(1));

// Get a named sheet
objSheet = objSheets.Item("#attribtues.sheetName#");


/* Save it as a new document -- the extension will automatically
   be appended based on the file type we choose.
   Some of the file types to convert to:
   1 = .xls
   3 = .txt (tab delimetered
   6 = .csv
*/
objSheet.SaveAs(CSVFilePath, Val(6));

// The next line would convert it to RTF instead
// objSpreadSheet.SaveAs(CSVFilePath,Val(6));

// Close the document
objBook.Close();

// Quit Word
objExcel.Quit();

if (attribtues.showConfirmation EQ 1) {
writeOutput("File Created:
""#attributes.CSVFileOut#"" from file:
""#attributes.excelFileIn#""");
}


  
  
  there was
an error creating your new CSV filesfrom your Excel Spreadsheet
  



__
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: COM help

2002-09-30 Thread Dave Wilson

Brian,

Although I've experienced pretty much what you describe, I've never seen the
process actually killing the CF Service itself.

To fix the problem of inactivity in the excel part of the process on
subsequent attempts, use the following:




Which should help to kill any locked connections to the sheet.

HTH,
Dave

-Original Message-
From: Brian Ferrigno [mailto:[EMAIL PROTECTED]]
Sent: 30 September 2002 16:40
To: CF-Talk
Subject: COM help


I need help tracking down an error in using CFOBJECT to create a csv file
from an excel spreadsheet.

I am using CF to open up an excel spreadsheet and then trying to turn the
data into a csv file. The code i'm using works fine the first time the
application is launched but on subsequent tries nothing happens. According
to the company hosting my site COM is causing the CF service to fail then it
has to be restarted. I'm listing the code i'm using below.

Is this an issue with a patch needing to be installed or a problem with the
code below? Any help would much appreciated. Thanks.


-Brian


Stats
--
CF version CF5.0
IIS
Windows 2K server

Code




  


  
  Cannot create Excel Object
  
  

  






// this code will open up the excel spread sheet and then save it as a CSV
file.

// HTML file path
ExcelFilePath = "#attributes.excelFileIn#";

// Destination path for new Word document
// We leave off the extension since we'll declare the file type later on
CSVFilePath = "#attributes.CSVFileOut#";

// Open Word in the background
objExcel.Visible = false;

// Disable alerts such as: 'Save this document?'
objExcel.DisplayAlerts = false;

// Get the 'Documents' collection
objBooks = objExcel.workbooks;

// Open the HTML document
objBook = objBooks.Open(ExcelFilePath);

// Get the sheets collection
objSheets = objBook.WorkSheets;

// Get the first sheet
objSheet = objSheets.Item(Val(1));

// Get a named sheet
objSheet = objSheets.Item("#attribtues.sheetName#");


/* Save it as a new document -- the extension will automatically
   be appended based on the file type we choose.
   Some of the file types to convert to:
   1 = .xls
   3 = .txt (tab delimetered
   6 = .csv
*/
objSheet.SaveAs(CSVFilePath, Val(6));

// The next line would convert it to RTF instead
// objSpreadSheet.SaveAs(CSVFilePath,Val(6));

// Close the document
objBook.Close();

// Quit Word
objExcel.Quit();

if (attribtues.showConfirmation EQ 1) {
writeOutput("File Created:
""#attributes.CSVFileOut#"" from file:
""#attributes.excelFileIn#""");
}


  
  
  there was
an error creating your new CSV filesfrom your Excel Spreadsheet
  


__
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



COM help

2002-09-30 Thread Brian Ferrigno

I need help tracking down an error in using CFOBJECT to create a csv file
from an excel spreadsheet. 

I am using CF to open up an excel spreadsheet and then trying to turn the
data into a csv file. The code i'm using works fine the first time the
application is launched but on subsequent tries nothing happens. According
to the company hosting my site COM is causing the CF service to fail then it
has to be restarted. I'm listing the code i'm using below. 

Is this an issue with a patch needing to be installed or a problem with the
code below? Any help would much appreciated. Thanks.


-Brian


Stats
--
CF version CF5.0
IIS
Windows 2K server

Code




  

 
  
  Cannot create Excel Object
  
  

  






// this code will open up the excel spread sheet and then save it as a CSV
file.

// HTML file path
ExcelFilePath = "#attributes.excelFileIn#";

// Destination path for new Word document
// We leave off the extension since we'll declare the file type later on
CSVFilePath = "#attributes.CSVFileOut#";

// Open Word in the background
objExcel.Visible = false;  

// Disable alerts such as: 'Save this document?'
objExcel.DisplayAlerts = false;   

// Get the 'Documents' collection
objBooks = objExcel.workbooks;  

// Open the HTML document
objBook = objBooks.Open(ExcelFilePath);  

// Get the sheets collection 
objSheets = objBook.WorkSheets;

// Get the first sheet 
objSheet = objSheets.Item(Val(1));   

// Get a named sheet 
objSheet = objSheets.Item("#attribtues.sheetName#");   


/* Save it as a new document -- the extension will automatically
   be appended based on the file type we choose.
   Some of the file types to convert to:
   1 = .xls
   3 = .txt (tab delimetered
   6 = .csv
*/
objSheet.SaveAs(CSVFilePath, Val(6));  
  
// The next line would convert it to RTF instead
// objSpreadSheet.SaveAs(CSVFilePath,Val(6));  
  
// Close the document
objBook.Close();

// Quit Word
objExcel.Quit();

if (attribtues.showConfirmation EQ 1) {
writeOutput("File Created:
""#attributes.CSVFileOut#"" from file:
""#attributes.excelFileIn#""");
}


  
  
  there was
an error creating your new CSV filesfrom your Excel Spreadsheet
  

__
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Com Help!

2002-06-13 Thread Joshua Miller

Have you looked at Amaya browser from W3C ? I think it's supposed to be
a browser/editor all-in-one. This would work for YOU making
modifications, but not other users unless you have something like WebDAV
support open to all. I didn't see that your cvs were in Word, so I'm
assuming you mean HTML only? If it's word then you can use Word over
WebDAV to edit documents live on the web. I'm also assuming you are the
only one that would be making changes?

Otherwise Philip's suggestion is probably the way to go. You can
generate Word from stored DB content with COM - perhaps you could store
everything in a DB and just display as RTF/Word when a user requests the
document. www.CFComet.com has info on how to make a RTF template with CF
variables so you could essentially generate the RTF/Word on demand
instead of trying to store, modify and deliver only Word docs.

Joshua Miller
Web Development :: Programming
Eagle Web Development LLC
www.eaglewd.com
[EMAIL PROTECTED]
(304) 622-5676 (Clarksburg Office)
(304) 456-4942 (Home Office)


-Original Message-
From: Philip Arnold - ASP [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, June 13, 2002 7:27 AM
To: CF-Talk
Subject: RE: Com Help!


> I'm new to com! And would like to know if the following is achievable.

> I am constructing a recruitment database, which holds cv's i need to 
> be able to open the cv within the browser, allow changes to be made 
> and then save it back to the server.  If this is possible could 
> someone point me in the right direction??

>From my understanding on what you want, you wouldn't need COM

Since the user downloads the file to their local machine (opening it in
the browser), then makes changes, it would need to be re-uploaded to
replace the file on the server

That would be one HELL of a difficult propostition, since the doc is
named under a temporary name when it's browsed, and then the user would
have to re-upload it

Here's a possible soltuion - use COM to get the body out of the Word
doc, display and edit in a Visual Editor, then once it's re-submitted,
use COM to place it back into the Word doc

Or, cut out the Word doc in the process and just store the CV in a
database

Philip Arnold
Technical Director
Certified ColdFusion Developer
ASP Multimedia Limited
Switchboard: +44 (0)20 8680 8099
Fax: +44 (0)20 8686 7911

www.aspmedia.co.uk
www.aspevents.net

An ISO9001 registered company.

**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they are
addressed. If you have received this email in error please notify the
system manager.
**



__
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Com Help!

2002-06-13 Thread Philip Arnold - ASP

> I'm new to com! And would like to know if the following is
> achievable.  I am constructing a recruitment database,
> which holds cv's i need to be able to open the cv within
> the browser, allow changes to be made and then save it
> back to the server.  If this is possible could someone point
> me in the right direction??

>From my understanding on what you want, you wouldn't need COM

Since the user downloads the file to their local machine (opening it in
the browser), then makes changes, it would need to be re-uploaded to
replace the file on the server

That would be one HELL of a difficult propostition, since the doc is
named under a temporary name when it's browsed, and then the user would
have to re-upload it

Here's a possible soltuion - use COM to get the body out of the Word
doc, display and edit in a Visual Editor, then once it's re-submitted,
use COM to place it back into the Word doc

Or, cut out the Word doc in the process and just store the CV in a
database

Philip Arnold
Technical Director
Certified ColdFusion Developer
ASP Multimedia Limited
Switchboard: +44 (0)20 8680 8099
Fax: +44 (0)20 8686 7911

www.aspmedia.co.uk
www.aspevents.net

An ISO9001 registered company.

**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
**


__
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Com Help!

2002-06-13 Thread Jason Congerton - RedHedNet

Hi

I'm new to com! And would like to know if the following is achievable.  I am
constructing a recruitment database, which holds cv's i need to be able to
open the cv within the browser, allow changes to be made and then save it
back to the server.  If this is possible could someone point me in the right
direction??

Kind Regards

Jason Congerton 


This e-mail and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
[EMAIL PROTECTED]

Whilst every endeavour is taken to ensure that e-mails are free from
viruses, no liability can be accepted and the recipient is requested
to use their own virus checking software.


__
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists