Wrox Programmer Forums
|
BOOK: Professional InfoPath 2003
This is the forum to discuss the Wrox book Professional InfoPath 2003 by Ian Williams, Pierre Greborio; ISBN: 9780764557132
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional InfoPath 2003 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 November 14th, 2007, 04:53 PM
Registered User
 
Join Date: Nov 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default export to existing excel spreadsheet

Hello:

I need to create a button in an InfoPath 2003 form that will insert the data into an existing excel spreadsheet.

I found this code that will do exactly what I want but I need it in jscript (I didn't set programming language to VB prior to creating form, 2007 will remove code but haven't found how to do so in 2003):

__________________________________________________ __________________________________________________ _

Answer
You can try this variation of the code:
Sub CopySelection()
  Selection.Copy
  Windows("Destination.xls").Activate
  With Sheets("Sheet1").Range("A1").CurrentRegion.End(xlD own)
      .Offset(1, 0).Select
      ActiveSheet.Paste
      .Offset(1, 0).Value = .Value + 1
  End With
End Sub
This can give an error if the value of column A is not a number, but this shouldn't be the case.

Hope this helps,
Miguel
__________________________________________________ __________________________________________________ ___



Can someone provide much the same in jscript?

Thanks,

Mary Potter



Mary Potter





Similar Threads
Thread Thread Starter Forum Replies Last Post
Export Table data into an Excel SpreadSheet hewstone999 Access VBA 0 March 3rd, 2008 07:00 AM
Export all tables in Access to a SpreadSheet hewstone999 Access VBA 0 February 29th, 2008 11:27 AM
Export to existing excel file with headings Neal Access VBA 0 February 27th, 2008 03:31 PM
Export a spreadsheet Corey Access 0 November 22nd, 2005 03:42 PM
Spreadsheet Export Sizes rweide Classic ASP Basics 0 February 25th, 2005 03:51 PM





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