Data in this list is required to be formatted in a table in MS Word so I can make a simple catalog with similar to this I have a long list of items so I need a faster and easier way to prepare the catalog, I intend to save it as a PDF afterwards, by placing company logo in page header. Any easier way to do this without having to pay for a catalog service is much appreciated
You can simply take the whole table from excel to word by selecting the whole table in excel then copying it and pasting it in the word file.
Another way is to create a table in the word file having exact number of rows and columns in your excel table. And than pasting the excel table data to the word table.
I hope this helps you.
Related
I'm trying to program a macro in excel to export data to a word report. This data will go into several Word tables. All data transfer commands are now ready and working. However, in order to make this transfers more dynamic, I am inserting Titles and creating bookmarks for all tables into word report.
The problem is:
Via excel macro, I am able to select the Word tables through the following code:
oDoc.Bookmarks("Table_name").Range.Select
However, I cannot transfer the data to a specific cell of this table.
I know the by Word there is this command, but I can't use with Excel.
ActiveDocument.Range(0,Selection.Paragraphs(1).Range.End).Tables.Count)
Would anyone know how to help me?
Before that I was transferring the data referencing the table number but the problem is that whenever we revise the report to include new tables my reference ends up getting lost and I have to do table count again to transfer the data in the right table .
Well, that's it! Thanks in advance if anyone can help me.
It entirely depends on how your document is constructed. If the bookmarks enclose content, then you can use:
oDoc.Bookmarks("Table_name").Range.Tables(1)
MS Word does not give each one a name, so you have to come up with your own system.
When you create the document with all the tables, you can give each one a name... using the Table.Descr property.
ActiveDocument.Tables(1).Descr = "myTable"
Then when you look for them, loop thru them and find that Descr
For Each t In ActiveDocument.Tables
If t.Descr = "myTable" Then
' do something
End If
Next
Or you can set up some constants for the Index if that helps.
Or you can create one routine that sets up variables by scanning the document that you would need to run only once.
On one hand there is an excel file with a table. In the table there are village names and a bunch of attributes in the columns.
On the other hand there is one docx file for each village. Within this file there are tables that need to be dynamically updated based on what is written in the xlsx file. If I was within excel I could use simple INDEX MATCH formulas that use name of village and name of paragraph to retrieve the right information from the xlsx file. But I am in a docx file...
To go through naming each cell in xlsx and linking it would be too tedious (there are hundreds of fields). Is there any way I could escape VBA? Thank you for any ideas (including VBA if really necessary).
You could use a DATABASE field in the Word document to retrieve the data for each village from the Excel file - one DATABASE field per village. See:
https://support.microsoft.com/en-us/office/field-codes-database-field-04398159-a2c9-463f-bb59-558a87badcbc
You will, of course, need to create the necessary query statement.
An example of such a DATABASE field's usage can be found at: https://www.msofficeforums.com/mail-merge/21847-mail-merge-into-different-coloumns.html#post67097
We're looking at allowing our customers to download an Excel file from our web application which contains a raw export of their data along with some basic charts and pivot tables based on that data.
The basic way, we want to make this work is that we have a fixed Excel file which contains all the reporting elements in one worksheet and have room for the underlying data in another worksheet. When the user requests their Excel report, we programmatically fill out the data worksheet with their results and send them the final Excel file.
Everything seemed a bit to easy when doing the prototyping with a fixed set of data. The dataset we worked with was added to the Excel Data Model and we then set up the charts and other reporting elements. However, when using that file as the template for the generated Excel file in our application we are finding that the definition of the data model still remains - meaning, that we built the "protype" with a table definition of $A$1:$T$5879
but when generating the report, that definition isn't changed to contain whatever size the added dataset might have.
We're using EPPlus to work with the generation of our Excel sheets and have so far been unable to find any sort of solution to this kind of problem. This might very much be due to us being quite Excel novices. The goal is to have the user experience, that the charts and pivot tables contained in the Excel sheet reflects the total dataset contained in the Excel file without them having to do anything.
Ok, I've actually found a solution for it.
The solution was right infront of us.
We define the dataset as a named set - this is done under under the "Formulas" and inside the "Name Manager". We have a range which defines our dataset - the "Refers To" field when defining a range can take a formula. So intead of giving it a fixed size, we use this: =OFFSET(Data!$A$1;0;0;COUNTA(Data!$A:$A);COUNTA(Data!$1:$1))
This counts the amount of rows and columns, with reference to A1 in our Data worksheet. All our pivots are set to reload on startup and that seems to work.
I'm provided with a folder of excel files. Each represent one form with data entered in specific cells. Each file is of the same format and each would for ONE row of information to be imported into my sql server database.
I believe I can loop through each excel file in the folder, however I am having issues finding the right tools to extract these specific cells and merge them into a single row to insert into the table.
Power Query to the rescue! :)
http://excelunplugged.com/2015/02/10/get-data-from-folder-in-power-query/
Ended up writing some VBA instead to move the data into a tabular / List form in one excel sheet then used that Document to feed SSIS. So far, does not seem like SSIS can do that initial part.
I have a series of table in Excel worksheets, all of them holds same data types, one table for one item, and how some values changed over time in each table column.
I want to create a excel graph/chart for each of this table, with same formatting, only the data should be different.
When I copy each from single graph to create many, the table link doesn't change and I have to do that manually, which is difficult because there are number of tables.
Is there any better solution? Thank you
The dirtiest solution is to simply use VBA to automate these changes.
I finally copied and pasted the same graphs for each table, undo the old links and linked each table separately. I was looking for a easier way than this because even this is difficult with number of tables increasing. Thank you.