Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I want export to my datas to excel using macros but i want export my data with some condition
for example I have an table with date,name and data in that i have date from 11-02-2014 to 21-02-2014 my condition is i want to export the data which is after 16-02-2014 i.e.,from 16-02-2014 to 21-02-2014.
I have attached a sample qvw file with this mail please help me..
Thanks in advance...
Sure, here you are.
You can probabily use this macro:
Sub sat
set obj = ActiveDocument.GetSheetObject("CH01")
obj.ExportEx "C:\test.qvd", 4
end sub
där 4 = QVD You need to have 5 how is excel.
Sub sat
set obj = ActiveDocument.GetSheetObject("CH01")
obj.ExportEx "C:\test.qvd", 5
end sub
BR //Gonza
Thanks but I need a data only from 16-02-2014 to 21-02-14 and I don't need other dates and all if i export to excel means i want data like this..
Date | Data | Name |
16-02-14 | 71 | F |
17-02-14 | 2 | G |
18-02-14 | 114 | H |
19-02-14 | 16 | I |
20-02-14 | 95 | J |
21-02-14 | 46 | K |
and add the condition as follows (example):
ActiveDocument.Fields("Month").Select ">4"
ActiveDocument.Fields("Month").ToggleSelect "<8"
No its not working how can i get a range between this or what is the macro to get a specific date in a field..?
Yes, you can put your date in a variable and use them in a setanalys exprexion on a pareto select inside en action. There is probabily more ways to do it, search for "date select", you will probabily found a lot of stuff.
//Gonza
No I am asking in macro neither not in set analysis nor pareto im asking for a vb scripts..?and export to excel in macro with condition..
Ohhhh , you can probabily add one of the follow rows into the macro:
ActiveDocument.Fields("date").Select ("(16-02-2014|21-02-2014)")
or
ActiveDocument.RecallDocBookmark "selection"
I used the second one the i use a bookmark.
BR//Gonza
no its not working can you give some other examples ..
Sure, here you are.