473,421 Members | 1,537 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,421 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
Sep 16 '22 #1
0 10066

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

Similar topics

0
by: sweeney_jones | last post by:
Hi, I am really struggling to figure out how to do this. I have a SQL view that contains 3 columns and upto 4000 rows. This is a series of question numbers and answers for a questionnaire....
0
by: Tim Kelley | last post by:
I have a dataviewgrid in my project which the user will select multiple rows. They will click a button and my program will perform some operation on the selected rows. My question is, how do I...
5
by: Simon | last post by:
Dear reader, With the export command you can export a query to Excel. By activate this command a form pop's up with the following text:
2
by: fanoftvb | last post by:
Hi, i currently has this code. When on click on the "Approve" button, the database of all the rows will change. I have "Approve" button on every row. How do i make it so that only the selected rows...
1
by: CoolFactor | last post by:
MY CODE IS NEAR THE BOTTOM I want to export this Access query into Excel using a command button on an Access form in the following way I describe below. Below you will find the simple query I am...
2
by: Widge | last post by:
I have an Excel template that has to be populated with data each month. It has to be a this particular template because it has several functions embedded into it which are for a bespoke accounting...
4
by: pkj7461 | last post by:
Hi, I was using Docmd.Transferspreadsheet to to populate query data in Excel. My code so far Dim xlApp As Excel.Application Dim xlWb As Excel.workbook Dim xlWs As Excel.Worksheet Set x1App =...
2
by: Comandur | last post by:
Hi, I am trying to export an access query to excel. I have made use of transferspreadsheet command to achive this. However i have hardcoded the path and the filename in the VBA code. I am not sure...
1
by: RobT | last post by:
My project is moving along smoothly- I've gotten a lot of info from this forum. One thread that helped me understand what I was doing is here. But I have a question I can't find an answer to. My...
1
by: bluenose83 | last post by:
Hi Guys, really no idea about VBA code but I trying to learn. I have a database which I am trying to set up to replace a number of existing excel documents. I do however need the database to...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.