Of course it could be done.
But passing it can be very dangerous.
Instead, write the first file as a module (or better yet, a function, or better better yet, an 'object'), and include it in the second.
That way you have the data available.
Passing the data (in lieu of a query string) would include storing it to the hard disk drive, which defeats the purpose.
Alt: Session storage.
Alt: File storage.
Alt: ?