MEGHA_cs
(MEGHA cs)
June 5, 2023, 4:47am
1
Hi all,
I have a scenario where I need to insert a Data table in Word document… But when I try to insert the table, the data is going to second page… but the table is not that big it has only two rows…
Please help me with how to get the data in same page…
TIA
MEGHA_cs
(MEGHA cs)
June 5, 2023, 5:21am
2
@Anil_G , Can you please help on this
Are you inserting only datatable ?
is this new word document you are using to insert or is it already with some data in it?
can you please provide some samples how you have implemented the logic and also if possible provide sample files
regards
MEGHA_cs
(MEGHA cs)
June 5, 2023, 8:08am
4
@LAKSHMI_NARAYANA_PEMMASAN ,
Yes I am inserting only datatable
and the word document is actually a invoice… It is a PDF am converting pdf to word and inserting datatable and again saving back to pdf
got it can you check manually when you opened the pdf document with word are you able
find empty space after the text ?
Anil_G
(Anil Gorthi)
June 5, 2023, 10:49am
6
@MEGHA_cs
Try using read text first…and get the data from word document
Then trim the text str.Trim and write the data to word document then use add table activity
That way any extra spaces or data would be removed
Cheers
MEGHA_cs
(MEGHA cs)
June 5, 2023, 11:31am
7
@LAKSHMI_NARAYANA_PEMMASAN ,
Yes there is a empty space, but manually also when I am copying its going to second page
MEGHA_cs
(MEGHA cs)
June 6, 2023, 4:16am
8
Thanks @Anil_G , But Not working…
Any other solution?
Anil_G
(Anil Gorthi)
June 6, 2023, 4:26am
9
@MEGHA_cs
Can you please send a sample please…that way we can see what the issue is
Or alternately try keeping a placeholder for table and use replace to insert the table at that position
Cheers
MEGHA_cs
(MEGHA cs)
June 6, 2023, 6:16am
10
@Anil_G , I cannot share the sample…
Let me try…
Meanwhile help me on “How to add values in DT, row values of a column to get total sum , where as the Values contain special characters”
My column values for 1st row is: $ 400.00
column value for 2nd row is:$ 500.00
Am reading excel file with “Preserve Format” , because I want all the symbols in output
Anil_G
(Anil Gorthi)
June 6, 2023, 7:36am
11
@MEGHA_cs
Please try this
dt.AsEnumerable.Sum(function(x) Cdbl(x("ColumnName").ToString.Replace("$","")))
cheers
1 Like
MEGHA_cs
(MEGHA cs)
June 6, 2023, 8:44am
12
Thanks @Anil_G , its working
1 Like
system
(system)
Closed
June 9, 2023, 8:45am
13
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.