Solved Exporting a access report to excel

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

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

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.
 
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.
 
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:
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
 
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,.
 
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

Back
Top Bottom