ITHistExporter reads supported Wonderware and AVEVA InTouch .lgh files and exports the recorded data to CSV for use in Excel. Neither InTouch nor HistData needs to be installed on the export computer.
Perhaps a customer has sent you a folder of history files, or someone needs last month’s temperature and pressure readings for a report. You do not necessarily need a new historian database or a restored HMI project. You need to identify the files, choose the relevant tags, and check that the exported timestamps and values mean what you think they mean.
This guide focuses on that file-to-CSV workflow.
What Is Inside an LGH File?
An LGH file is a binary historical log file created by InTouch. It can contain recorded tag values, such as discrete equipment states, integer counters, and real-valued process measurements, together with their timestamps.
It is not a spreadsheet. Renaming .lgh to .csv or opening it directly in Excel does not convert the contents into rows and columns.
Also, InTouch LGH files and an AVEVA Historian database are different data sources. A tutorial about SQL queries against Historian is not necessarily useful when all you have is a folder of LGH files.
Before Starting Your LGH Export
Work from a copy of the history files and retain the originals. If the archive includes associated .idx files, keep those alongside the original files too. An exported CSV is useful for analysis, but it should not become your only copy of the historical record.
Check three things before exporting:
- Date coverage: Does the archive include the period you need? The history directory depends on the InTouch application’s logging configuration; do not assume every installation uses the same folder.
- Tags: Which measurements or equipment states are relevant? Keep project documentation available for units, descriptions, and equipment references.
- Time convention: Will the recipient expect UTC or local plant time? Agree on this before comparing the export with shift reports or maintenance records.
How to Export LGH Data with ITHistExporter
1. Open the history files
Launch ITHistExporter and use Open to select your LGH files. For an archive spread across folders, Scan Lgh Files helps locate files without opening each folder manually.
Start with one representative file. Open Raw Data Preview and inspect a few known tags. Confirm that the values and dates are plausible before moving on to a large batch.
2. Select the tags and time range
Use Export Filter to choose the tags you need. Enable the filter when you want those selections and any configured time limits to apply to the export.
For example, a cooling-system investigation might need only the supply temperature, return temperature, flow rate, and pump-running state. Exporting every tag in the application can make the result harder to review without helping answer the question.
If you restrict the time range, check that it overlaps the files you loaded. Files entirely outside the active time filter are skipped.
3. Choose Raw Data or Fit Data
Raw Data exports recorded samples rather than aligning them to a new regular interval. Use it when the original sequence matters, such as examining a short pressure disturbance or checking when an equipment state changed.
Fit Data places values on a configured time interval. This is useful when you want measurements on a common timeline for spreadsheet comparisons and reports.
A one-minute Fit Data interval is not a one-minute average. Values are carried forward between recorded changes, and a coarser interval can hide short-lived changes that remain visible in the raw records.
For incident investigations, I recommend keeping the raw export and creating a separate interval-based dataset for the report. That leaves the original samples available if you need to check a brief change that the report interval missed.
4. Select CSV and export
Choose CSV File Format, check the output folder and time settings, then select the appropriate export action:
- Export processes the selected file.
- Export Checked processes the files you have checked.
- Export All processes the files in the list.
Batch processing handles the selected history files individually. It does not automatically combine the entire archive into one CSV. If you need a consolidated monthly dataset, combine the outputs in Excel Power Query or another analysis tool after checking their columns, date coverage, and possible overlaps.
5. Import the CSV into Excel
In Excel, use Data > From Text/CSV and select the exported file. Review the delimiter, encoding, and detected column types before loading it.
If the preview shows each record in a single column, check the delimiter first. ITHistExporter’s CSV output uses spaces between double-quoted fields, rather than commas. Select Space as the delimiter and check that each quoted timestamp stays in one field, including the space between its date and time.
The layout depends on the export mode:
- Raw Data: Four fields per record: tag name, timestamp, data type, and value. There is no header row, and records are grouped by tag rather than sorted across all tags by time.
- Fit Data: A header row starts with
Time, followed by the tag names. Each subsequent row contains the values for one interval timestamp.
For Raw Data, make sure Excel has not used the first record as column headings. Keep tag names as text if Excel would otherwise convert them to numbers or dates. The same exported files can also be imported into Python or reporting tools with the appropriate delimiter setting.
Keep Excel’s worksheet limit in mind: a modern worksheet supports 1,048,576 rows, including any header row. A CSV can contain more records than Excel can display in one sheet. Split a large dataset or process it outside a worksheet rather than assuming that everything visible in Excel is the complete export.
Check the Result Before Using It in a Report
Before sharing the export, check:
- Time coverage: Do the earliest and latest timestamps for each required tag cover the period you need? Allow for the source logging interval when comparing them with the filter boundaries.
- Time zone: Do known events line up with the source system or plant records, including daylight-saving changes where relevant?
- Tag selection: Are the required tags present, and was the export filter enabled?
- Values and units: Do representative readings make sense against the preview and project documentation?
- Export limits: Are you using an evaluation version with record limits, or has Excel displayed only part of a larger file?
Irregular intervals in raw data are not automatically evidence of an export problem. Historical logging settings affect which samples were recorded. Conversely, a regular-looking Fit Data result should not be taken as proof that the underlying archive is complete.
When Would You Use HistData Instead?
If you already maintain an InTouch installation with a working HistData export workflow, there may be no reason to replace it. HistData provides a DDE-based route to CSV within an existing InTouch environment.
A standalone LGH reader serves a different situation: you have the files and want to inspect or export them without setting up that environment on the analysis computer. This is particularly useful for customer archives, retired workstations, and one-off investigations.
LGH Export Questions
Can I export LGH files without InTouch installed?
Yes. ITHistExporter reads supported LGH files without requiring InTouch or HistData on the export computer.
Can I convert LGH to Excel?
Yes. Export to CSV, then import the file into Excel using the delimiter and column settings described above. You can then save the imported data as an Excel workbook.
Is there a free trial?
ITHistExporter offers a free 7-day trial. The evaluation version limits the number of exported records. It lets you check file compatibility and the export workflow, but it is not intended for exporting a complete archive.
Try an Export with Your Own Files
Download ITHistExporter to try the workflow with your own LGH files. Use a tag with a known value or a recorded event as a reference when comparing the preview with the export.