Solved Exporting a access report to excel (1 Viewer)

Snappy1263

Registered User.
Local time
Today, 15:19
Joined
Dec 8, 2015
Messages
130
upload your template and i will work on it.
The data needs to start on row 8 and here is the path to the template. S:\Allfiles\GLBT\BW\2022
 

Attachments

  • BW TEMPLATE.pdf
    62.3 KB · Views: 102

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 03:19
Joined
May 7, 2009
Messages
19,229
this is a "demo", so the data is coming from my table.
but it is writing the data in excel at line 8.
you need to incorporate this with your own table/query.

put all in same folder and run the db.
 

Attachments

  • toExcel.zip
    116.1 KB · Views: 116

Snappy1263

Registered User.
Local time
Today, 15:19
Joined
Dec 8, 2015
Messages
130
this is a "demo", so the data is coming from my table.
but it is writing the data in excel at line 8.
you need to incorporate this with your own table/query.

put all in same folder and run the db.
So amazing it worked perfectly. One thing only that I am hoping that can be done. Not sure thought. Is there a way to put a row in between each model. Here is the excel sheet with what you designed. I just added another field and it worked great. But if I could have a row added, its not a deal breaker but less clean up for me. Thank you so much for this, I will be able to use it in other ways too.
 

Attachments

  • zample.pdf
    93.8 KB · Views: 112

Pat Hartman

Super Moderator
Staff member
Local time
Today, 15:19
Joined
Feb 19, 2002
Messages
43,231
All, I do not know how my customers uses the spreadsheet for their system.
That is the point. Just export the query you use to make the report.
Is there a way to put a row in between each model.
Don't try to format it. No code required.

Think about it. If you import the table with the blank lines, you are going to have to do something to get rid of the blank lines because blank lines do NOT belong in a table. They want a TABLE, not something formatted.
 

Snappy1263

Registered User.
Local time
Today, 15:19
Joined
Dec 8, 2015
Messages
130
That is the point. Just export the query you use to make the report.

Don't try to format it. No code required.

Think about it. If you import the table with the blank lines, you are going to have to do something to get rid of the blank lines because blank lines do NOT belong in a table. They want a TABLE, not something formatted.
Unfortunately this has to be a formal price sheet. This is for them to accept or not accept. What they do with it after that does not concern me.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 12:19
Joined
Oct 29, 2018
Messages
21,454
This is for them to accept or not accept.
Hi. Just curious, what does this means exactly? For example, if I were to send a project estimate cost to a potential client, I could give them the proposal in Word or Excel. However, that would mean they could freely change the price, because the file is editable (not sure if anyone would actually do that, but we never know). If they do that, then it would be a matter of arguing what the original price was that I gave them. So, to avoid all that, I usually just submit PDF versions of those price proposals. This probably doesn't apply to your situation, but I was just curious about what you just said. Cheers!
 
Last edited:

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 03:19
Joined
May 7, 2009
Messages
19,229
hi.
i change i = 6, then add another line that add 1 to i.
change your code appropritely:

Rich (BB code):
        j = 6
        Do Until .EOF
            j = j + 1
            For i = 0 To .Fields.Count - 1
                If i < 1 Then
                    If sText <> .Fields(i).Value & "" Then
                        sText = .Fields(i).Value & ""
                        j = j + 1
                        oWB.sheets(1).range(Chr(65 + i) & j) = .Fields(i).Value
                    End If
 

Snappy1263

Registered User.
Local time
Today, 15:19
Joined
Dec 8, 2015
Messages
130
hi.
i change i = 6, then add another line that add 1 to i.
change your code appropritely:

Rich (BB code):
        j = 6
        Do Until .EOF
            j = j + 1
            For i = 0 To .Fields.Count - 1
                If i < 1 Then
                    If sText <> .Fields(i).Value & "" Then
                        sText = .Fields(i).Value & ""
                        j = j + 1
                        oWB.sheets(1).range(Chr(65 + i) & j) = .Fields(i).Value
                    End If
You are my hero, thank so very much. This works perfectly just what I needed,.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 15:19
Joined
Feb 19, 2002
Messages
43,231
Unfortunately this has to be a formal price sheet. This is for them to accept or not accept. What they do with it after that does not concern me.
Send them a formal price sheet. When a customer asks for a file because they want to import it, if you are going to satisfy the request, you send them a file, you don't send them a report and call it a file just because it is excel rather than a PDF. What you are sending requires them to manipulate data in order to import the file. It is not just a matter of mapping columns in an append query. If you are not going to provide what they asked for, let them use OEM software to pull the table out of the PDF. you are better off because then if they make a mistake with the import, it is all on them not on you.
 

Users who are viewing this thread

Top Bottom