My Apex Connect & Go program rewritten in C# The original version written in Python can be found here - https://github.com/Brand07/Python--Apex-Connect-And-Go
AutoApexImport is a C# console application designed to automate the process of importing data from an Excel spreadsheet into the Apex Connect & Go web application. It uses Selenium for web browser automation to navigate the Apex application and EPPlus to read data from the Excel file.
Before you begin, ensure you have met the following requirements:
- .NET 9.0 SDK or later.
- Google Chrome installed on your system.
- Clone the repository:
git clone https://github.com/Brand07/AutoApex.git
- Navigate to the project directory:
cd AutoApexImport - Restore the .NET packages:
dotnet restore
The application uses a .env file to manage sensitive information and configuration settings.
-
Create a file named
.envin the root of the project (C:\repos\AutoApex\AutoApexImport\.env). -
Add the following environment variables to the
.envfile:EXCEL_PATH="path\\to\\your\\excel\\file.xlsx" APEX_USERNAME="your_apex_username" APEX_PASSWORD="your_apex_password" API_KEY="your_freshservice_api_key" DOMAIN="your_domain" REQUESTER_ID="your_freshservice_requester_id"Replace the placeholder values with your actual Excel file path and APEX credentials.
This application can automatically create tickets in FreshService for each user processed from the Excel file. Ticket creation is controlled by a configuration flag and environment variables.
- Ticket creation is controlled by the
logTicketsflag in the code. Set it totrueto enable ticket creation, orfalseto disable it. - When enabled, a FreshService ticket will be created for each user processed.
Add the following variables to your .env file for FreshService integration:
API_KEY="your_freshservice_api_key"
DOMAIN="your_freshservice_domain" # e.g., 'yourcompany' for yourcompany.freshservice.com
REQUESTER_ID="your_freshservice_requester_id" # Must be a valid FreshService user ID (as a number)
To run the application, execute the following command from the project's root directory:
dotnet runThe application will then:
- Launch a new Chrome browser instance.
- Navigate to the Oracle APEX login page.
- Log in with the provided credentials.
- Read data from the specified Excel file.
- Automate the data import process into the APEX application.
- (Optional) Create a FreshService ticket for each user, if ticket logging is enabled.
This project is licensed under the MIT License. See the LICENSE file for details.
Note: This project uses EPPlus, which is licensed under Polyform Noncommercial 1.0.0. If you intend to use this project for commercial purposes, you must obtain a commercial license for EPPlus. See the EPPlus License for more information.