<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Why did I want to use data file as data source and no data display?]]></title><description><![CDATA[<p dir="auto">Now .I try to use data file ( excel file) as a data source .<br />
But when I choosen the data source and build data point in mango .<br />
and no data to display?</p>
<p dir="auto">whether where did I setting up is error?</p>
<p dir="auto">Attachment: <a href="http://archive.infiniteautomation.com/forum/posts/downloadAttach/401.page" rel="nofollow ugc">download link</a></p>
]]></description><link>https://forum.mango-os.com/topic/1721/why-did-i-want-to-use-data-file-as-data-source-and-no-data-display</link><generator>RSS for Node</generator><lastBuildDate>Thu, 11 Jun 2026 23:04:11 GMT</lastBuildDate><atom:link href="https://forum.mango-os.com/topic/1721.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 02 Oct 2014 17:10:44 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Why did I want to use data file as data source and no data display? on Wed, 16 Apr 2025 07:44:01 GMT]]></title><description><![CDATA[<p dir="auto">You might want to use a data file as a data source because it’s easy to manage, but if no data displays, there could be an issue with the file format or connection. For reliable <a href="https://www.hostnoc.com/data-backup-and-recovery/" rel="nofollow ugc">data backup and recovery</a> solutions, consider HostNoc to ensure your data stays safe and accessible. The keyword is data backup and recovery.</p>
]]></description><link>https://forum.mango-os.com/post/28457</link><guid isPermaLink="true">https://forum.mango-os.com/post/28457</guid><dc:creator><![CDATA[Davidmenk3]]></dc:creator><pubDate>Wed, 16 Apr 2025 07:44:01 GMT</pubDate></item><item><title><![CDATA[Reply to Why did I want to use data file as data source and no data display? on Sat, 04 Oct 2014 10:04:16 GMT]]></title><description><![CDATA[<p dir="auto">From the help text:</p>
<blockquote></blockquote>
<p dir="auto"><strong>Overview</strong></p>
<p dir="auto">The Data File Data Source is intended to poll a particular directory for files, and either adds the parsed points to itself as Mango data points or uses it to map the file's identifiers to other points within Mango. Currently, the data source is ready to accept XML, CSV, and Excel documents <em>after some custom coding, explained in the related links</em>:</p>
<p dir="auto"><strong>Creating Excel Import Classes</strong></p>
<p dir="auto">Excel files are parsed using a minor variation of the AbstractSheetEmporter class found in com.serotonin.vo.emport called AbstractSheetDataSource, which imposes no further constraints on the subclass, as far as methods that must be implemented. Instead the implementer should call parsedPoints.add(ImportPoint pnt) from within the importRow(Row rowData) method. Following is a sample implementation:</p>
<pre><code>import java.util.List; import org.apache.commons.lang3.ArrayUtils; import org.apache.poi.ss.usermodel.Cell; import org.apache.poi.ss.usermodel.Row; import com.serotonin.m2m2.vo.emport.SpreadsheetException; import com.infiniteautomation.datafilesource.dataimage.AlphanumericImportPoint; import com.infiniteautomation.datafilesource.dataimage.BinaryImportPoint; import com.infiniteautomation.datafilesource.dataimage.NumericImportPoint; /* * @author Phillip Dunlap * General format accepted: cell(0,0) is empty, row(0) contains point names to be identified by the ds's * data points, column(0) is epoch timestamps, and cell(m,n) is the value of point (row(0),cell(m)) at time (row(n),cell(0)) */ public class ColumnBasedSheetImporter extends AbstractSheetDataSource { //Generated in the datasource at polling runtime against the set of data points String[] xidMap; //Also generated, used to set values @Override protected String getSheetName() { return "nameOfSheetInExcel"; } @Override public void setHeaders(String[] headers) { String[] cell0 = {"corner"}; //Cell(0,0) is empty this.headers = ArrayUtils.addAll(cell0, headers); } public void setXids(String[] xidMap) { this.xidMap = xidMap; } @Override public boolean takesPointHeaders() { return true; } @Override protected void importRow(Row rowData) throws SpreadsheetException { if(rowData.getPhysicalNumberOfCells() &lt;= 0) return; long ts = (long) rowData.getCell(0).getNumericCellValue(); for(int k = 1; k &lt; rowData.getPhysicalNumberOfCells(); ++k) { switch(rowData.getCell(k).getCellType()) { case Cell.CELL_TYPE_NUMERIC : parsedPoints.add(new NumericImportPoint(xidMap[k-1], rowData.getCell(k).getNumericCellValue(), ts)); break; case Cell.CELL_TYPE_BOOLEAN : parsedPoints.add(new BinaryImportPoint(xidMap[k-1], rowData.getCell(k).getBooleanCellValue(), ts)); break; case Cell.CELL_TYPE_STRING : parsedPoints.add(new AlphanumericImportPoint(xidMap[k-1], rowData.getCell(k).getStringCellValue(), ts)); break; default : //parsedPoints.add(new AlphanumericImportPoint(xidMap[k-1], rowData.getCell(k).toString(), ts)); break; } } } @Override protected CellType[] getColumnTypes() { // Not Implemented return null; } @Override protected int[] getColumnWidths() { // Not Implemented return null; } @Override protected List&lt;List&lt;Object&gt;&gt; exportRows() { // Not Implemented return null; } }
</code></pre>
<p dir="auto">So you will need to write some code for Mango to import data from a XLS file.</p>
]]></description><link>https://forum.mango-os.com/post/9360</link><guid isPermaLink="true">https://forum.mango-os.com/post/9360</guid><dc:creator><![CDATA[jeremyh]]></dc:creator><pubDate>Sat, 04 Oct 2014 10:04:16 GMT</pubDate></item><item><title><![CDATA[Reply to Why did I want to use data file as data source and no data display? on Fri, 03 Oct 2014 04:53:49 GMT]]></title><description><![CDATA[<p dir="auto">No answer.<br />
:(</p>
]]></description><link>https://forum.mango-os.com/post/9354</link><guid isPermaLink="true">https://forum.mango-os.com/post/9354</guid><dc:creator><![CDATA[edmond]]></dc:creator><pubDate>Fri, 03 Oct 2014 04:53:49 GMT</pubDate></item></channel></rss>