I have a spreadsheet which extracts and accumulates all the required data from other 6 spreadsheets using Vmerge and Query formulas and all the consolidated data will be converted to pdf and emaild to mail ids using trigger event.
Here begins the problem every time the attachment mail posted consist all the headers and other format, but the data which is extracted does not appear. It seems to appear like - to open the same spreadsheet, after a while all the - (hyphens) are replaced by the data / Hope all the data updates after a while of opening the spreadsheet.

Can anyone direct me to make this issue sorted out.
For this solution should be -> all the data should be updated and then the email script should work; or either it should update before emailing script starts.
Or any other better ideas are appreciated.
Some spreadsheet formulas, like
ImportRangeandImportXml(and also Apps Script custom formulas) are only evaluated when there’s someone logged in the spreadsheet. It’s like these functions need an account to be evaluated from, for example, inimportRangethe account logged in must have access to the range being imported, if you share this spreadsheet with someone but not theimportRangesource, when this person is viewing this spreadsheet, theimportRangefunction will not work (well, unless you’re also in the spreadsheet and the formulas have already been evaluated).Bottom line is, you can’t have this formulas and use a script triggered on time-driven (or other trigger that does not require someone logged in) and expect the script to be able to read this data.
The workaround though is quite simple. Do what the
importRangefunction does inside your script! e.g.All your “logic” formulas, like
queryandvmerge, which are difficult for the script to mimic, can be left on the spreadsheet, but reference this “hidden-import” sheet I just invented instead of nestingimportRangedirectly.[edit]
To copy only non-empty rows do like this: