471,321 Members | 1,652 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,321 software developers and data experts.

How to use TransferSpreadsheet to transfer query data to Excel Template selected rows

Hi Team,

This is the code i am using to transfer data to a excel template, the data is pasted from cell A1. i wanted the data transferred from row 11 and onward.
Expand|Select|Wrap|Line Numbers
  1. Private Sub Command18_Click()
  2.  
  3. Dim filepath As String
  4. Dim sSheetName As String
  5.  
  6. sSheetName = InputBox("Enter Sheet Name")
  7. filepath = "C:\Users\msheikh\Documents\Fremont Maintenance Support\DB\CSP_Template.xlsx"
  8. DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel12Xml, "CSP_Data_Query", filepath, True, sSheetName
  9.  
  10.  
  11. MsgBox (" CSP Data is Successfully Exported ")
  12.  
  13.  
  14. End Sub
1 Week Ago #1
0 6451

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

reply views Thread by sweeney_jones | last post: by
5 posts views Thread by Simon | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.