Skip to content
DataMiner DoJo

More results...

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Search in posts
Search in pages
Search in posts
Search in pages
Log in
Menu
  • Blog
  • Questions
  • Learning
    • E-learning Courses
    • Open Classroom Training
    • Certification
      • DataMiner Fundamentals
      • DataMiner Configurator
      • DataMiner Automation
      • Scripts & Connectors Developer: HTTP Basics
      • Scripts & Connectors Developer: SNMP Basics
      • Visual Overview – Level 1
      • Verify a certificate
    • Tutorials
    • Video Library
    • Books We Like
    • >> Go to DataMiner Docs
  • Expert Center
    • Solutions & Use Cases
      • Solutions
      • Use Case Library
    • Markets & Industries
      • Media production
      • Government & defense
      • Content distribution
      • Service providers
      • Partners
      • OSS/BSS
    • DataMiner Insights
      • Security
      • Integration Studio
      • System Architecture
      • DataMiner Releases & Updates
      • DataMiner Apps
    • Agile
      • Agile Webspace
      • Everything Agile
        • The Agile Manifesto
        • Best Practices
        • Retro Recipes
      • Methodologies
        • The Scrum Framework
        • Kanban
        • Extreme Programming
      • Roles
        • The Product Owner
        • The Agile Coach
        • The Quality & UX Coach (QX)
    • DataMiner DevOps Professional Program
  • Downloads
  • More
    • Feature Suggestions
    • Climb the leaderboard!
    • Swag Shop
    • Contact
      • General Inquiries
      • DataMiner DevOps Support
      • Commercial Requests
    • Global Feedback Survey
  • PARTNERS
    • All Partners
    • Technology Partners
    • Strategic Partner Program
    • Deal Registration
  • >> Go to dataminer.services

how can we read data from the excel sheet?

Solved1.15K views19th January 2024DIS excel protocol help
0
SHIVALINGAYYA MATHAPATI30 27th October 2023 0 Comments

I wanted to read the data from the particular excel sheet using the protocol. And display that excel sheet data as a table in dataminer. It will be great help to me if someone guide me here.

The file is stored in local/SharePoint we need to dump that data to dataminer.

Marieke Goethals [SLC] [DevOps Catalyst] Selected answer as best 19th January 2024

2 Answers

  • Active
  • Voted
  • Newest
  • Oldest
3
Pedro Debevere [SLC] [DevOps Enabler]1.80K Posted 27th October 2023 5 Comments

Hi,

the following question/answer provides some pointers on how to do read an Excel sheet:

https://community.dataminer.services/question/reading-writing-to-an-excel-file-in-net/answer/105057/

Marieke Goethals [SLC] [DevOps Catalyst] Selected answer as best 19th January 2024
SHIVALINGAYYA MATHAPATI commented 31st October 2023

When I am checking for the file, it is saying not found always from the local system folders. File.Exist().

Is there any specific reason why the driver is not able to find the file ?

Shiva_Excel_DataSource_Demo
Shiva_Excel_DataSource_Demo DataMiner driver
1.0.0.1
DMS-DRV-0001
skyline
deloitte
1.3.6.1.4.1.8813.2.01
1
Information Platform
snmpv2

auto

Added my protocol metadata here.

using (var conn = new OleDbConnection(connString))
{
conn.Open();
var query = “SELECT * FROM [” + Path.GetFileName(filename) + “]”;
using (var adapter = new OleDbDataAdapter(query, conn))
{

}
}

Exception:
System.Data.OleDb.OleDbException (0x80040E37): The Microsoft Jet database engine could not find the object ‘DTCData.csv’. Make sure the object exists and that you spell its name and the path name correctly.

Pedro Debevere [SLC] [DevOps Enabler] commented 31st October 2023

Is the exception thrown when opening the connection or when executing the query? (in case of the latter, can you check if the SELECT query is valid? I believe this should contain the name of the sheet and not the file name.
Alternatively, you could try to use the DocumentFormat.OpenXml NuGet package instead. An example of how to open and read the contents of an Excel file:

// filePath contains the full file path to the .xlsx file.
using (SpreadsheetDocument document = SpreadsheetDocument.Open(filePath, false, new OpenSettings()))
{
WorkbookPart workbookPart = document.WorkbookPart;
WorksheetPart worksheetPart = workbookPart.WorksheetParts.First();
Spreadsheet.Worksheet worksheet = worksheetPart.Worksheet;
Spreadsheet.SheetData sheetData = worksheet.GetFirstChild();

// Iterate through each row in the sheet
foreach (Spreadsheet.Row row in sheetData.Elements())
{
// process data here using e.g. row.ElementAt(0); to retrieve the first column
}
}

SHIVALINGAYYA MATHAPATI commented 2nd November 2023

Hi
I have tried this, I am getting following issue which I was getting earlier also.

When I run this code with normal windows application it works perfectly. But issue is with dataminer protocol code. Is there anything specific access/permission to be granted from the Dataminer to access the files from local.

Exception:
System.IO.FileNotFoundException: Could not find document
File name: ‘C:Skyline DataMinerDocumentsSample.xlsx’
at DocumentFormat.OpenXml.Packaging.PackageLoader.OpenCore(String path, Boolean readWriteMode)
at QAction.ReadXlsx(String path, SLProtocol protocol)
at QAction.Run(SLProtocolExt protocol)

Pedro Debevere [SLC] [DevOps Enabler] commented 2nd November 2023

Hi,
The QAction should be able to open the file. To troubleshoot, can you test the following:
– verify that the file is present on the Agent
– in the QAction enumerate the files of the folder where te Excel file is located. If it is not included and you’re in a cluster setup, can you verify if the element that executes the QAction is on the same Agent as the Agent where the document is located.
– Test if the file exists via an Automation script

SHIVALINGAYYA MATHAPATI commented 7th November 2023

Thank you Pedro, it is working now.

You are viewing 1 out of 2 answers, click here to view all answers.
Please login to be able to comment or post an answer.

My DevOps rank

DevOps Members get more insights on their profile page.

My user earnings

0 Dojo credits

Spend your credits in our swag shop.

0 Reputation points

Boost your reputation, climb the leaderboard.

Promo banner DataMiner DevOps Professiona Program
DataMiner Integration Studio (DIS)
Empower Katas

Recent questions

Correlation Engine: “Test rule” doesn’t result in a hit, despite functional rule 0 Answers | 1 Vote
When using the Setter = true attribute, will the copy action always be executed first? 1 Answer | 2 Votes
Multiple Set on Table parameters for DVE’s 1 Answer | 2 Votes

Question Tags

adl2099 (115) alarm (62) Alarm Console (82) alarms (100) alarm template (83) Automation (223) automation scipt (111) Automation script (167) backup (71) Cassandra (180) Connector (109) Correlation (69) Correlation rule (52) Cube (150) Dashboard (194) Dashboards (188) database (83) DataMiner Cube (57) DIS (81) DMS (71) DOM (140) driver (65) DVE (56) Elastic (83) Elasticsearch (115) elements (80) Failover (104) GQI (159) HTTP (76) IDP (74) LCA (152) low code app (166) low code apps (93) lowcodeapps (75) MySQL (53) protocol (203) QAction (83) security (88) SNMP (86) SRM (337) table (54) trending (87) upgrade (62) Visio (539) Visual Overview (345)
Privacy Policy • Terms & Conditions • Contact

© 2025 Skyline Communications. All rights reserved.

DOJO Q&A widget

Can't find what you need?

? Explore the Q&A DataMiner Docs

[ Placeholder content for popup link ] WordPress Download Manager - Best Download Management Plugin