INFO function
PRO
The INFO
function in Jspreadsheet Formulas Pro is a tool that provides details about the current operating environment. This can include information about the version of Jspreadsheet Formulas Pro you're using or the operating system it is running on. This function can be particularly useful when troubleshooting issues or customizing your work to suit your specific system setup.
Documentation
Returns information about the current operating environment, such as the Jspreadsheet version and the operating system.
Category
Information
Syntax
INFO(type_text)
Parameter | Description |
---|---|
type_text |
A text string specifying the type of information you want to retrieve. Currently, only the following information types are supported: 'directory', 'numfile', 'origin', 'osversion', 'recalc', 'release', and 'system'. |
Behavior
The INFO
function provides information about the current operating environment, such as the operating system, the status of the num lock, caps lock, scroll lock, and more. It's important to note the following behaviors:
- The
INFO
function does not interact with cell content, therefore the handling of empty cells, text, booleans, and errors are not applicable. - It returns a text string with the information requested in the argument.
- The function requires a specific type of information to be provided as an argument. For example, "directory", "system", "recalc", "release", "osversion", etc.
- If the argument provided is not recognized, the
INFO
function will return a#VALUE!
error.
Common Errors
Error | Description |
---|---|
#VALUE! | This error occurs when the argument provided in the INFO function is not recognized. |
Best practices
- Always ensure to provide a valid argument that the
INFO
function can recognize. To avoid errors, it is best to check the documentation for the list of valid arguments.- Use the
INFO
function to troubleshoot problems with your spreadsheet, as it provides valuable information about the current operating environment.- Be aware that information returned by
INFO
function may vary across different versions and platforms.- Remember that
INFO
function does not interact with cell content, it's primary use is to provide system or environment specific information.
Usage
A few examples using the INFO function.
INFO("directory") → Returns the current working directory (if supported by the environment)
INFO("osversion") → Returns the detected operating system version
INFO("release") → Returns the current Jspreadsheet release number
Interactive Spreadsheet Demo
<html>
<script src="https://jspreadsheet.com/v11/jspreadsheet.js"></script>
<script src="https://jsuites.net/v5/jsuites.js"></script>
<link rel="stylesheet" href="https://jsuites.net/v5/jsuites.css" type="text/css" />
<link rel="stylesheet" href="https://jspreadsheet.com/v11/jspreadsheet.css" type="text/css" />
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Material+Icons" />
<script src="https://cdn.jsdelivr.net/npm/@jspreadsheet/formula-pro/dist/index.min.js"></script>
<div id="spreadsheet"></div>
<script>
// Set your JSS license key (The following key only works for one day)
jspreadsheet.setLicense('N2RiNGFhMmIzZmM5ZTlhZTY2ZDU3YTMzMjFmNDQ2MGM4ZmU2ZGZmNzIxMDg5ZDg5YTc0OWI5ZGIyODIwMjhjNDFkM2UyZjRjYjQ5ZjFlYjMyYTRiNGM1MDBiZTMyMGI1YzNiMDc2ZmNiZTRhNWNmZDM0NDE4NTUwZjJmNWZlZWMsZXlKamJHbGxiblJKWkNJNklpSXNJbTVoYldVaU9pSktjM0J5WldGa2MyaGxaWFFpTENKa1lYUmxJam94TnpVM01ETXhNRFF3TENKa2IyMWhhVzRpT2xzaWFuTndjbVZoWkhOb1pXVjBMbU52YlNJc0ltTnZaR1Z6WVc1a1ltOTRMbWx2SWl3aWFuTm9aV3hzTG01bGRDSXNJbU56WWk1aGNIQWlMQ0p6ZEdGamEySnNhWFI2TG1sdklpd2lkMlZpWTI5dWRHRnBibVZ5TG1sdklpd2lkMlZpSWl3aWJHOWpZV3hvYjNOMElsMHNJbkJzWVc0aU9pSXpOQ0lzSW5OamIzQmxJanBiSW5ZM0lpd2lkamdpTENKMk9TSXNJbll4TUNJc0luWXhNU0lzSW1Ob1lYSjBjeUlzSW1admNtMXpJaXdpWm05eWJYVnNZU0lzSW5CaGNuTmxjaUlzSW5KbGJtUmxjaUlzSW1OdmJXMWxiblJ6SWl3aWFXMXdiM0owWlhJaUxDSmlZWElpTENKMllXeHBaR0YwYVc5dWN5SXNJbk5sWVhKamFDSXNJbkJ5YVc1MElpd2ljMmhsWlhSeklpd2lZMnhwWlc1MElpd2ljMlZ5ZG1WeUlpd2ljMmhoY0dWeklpd2labTl5YldGMElsMHNJbVJsYlc4aU9uUnlkV1Y5');
// Set the extensions
jspreadsheet.setExtensions({ formula });
// Create a new spreadsheet
jspreadsheet(document.getElementById('spreadsheet'), {
worksheets: [{
data: [
[
"System Information",
"Value"
],
[
"Directory",
"=INFO(\"directory\")"
],
[
"OS Version",
"=INFO(\"osversion\")"
],
[
"Excel Release",
"=INFO(\"release\")"
]
]
}]
});
</script>
</html>
import React, { useRef } from "react";
import { Spreadsheet, Worksheet, jspreadsheet } from "@jspreadsheet/react";
import formula from "@jspreadsheet/formula-pro";
import "jsuites/dist/jsuites.css";
import "jspreadsheet/dist/jspreadsheet.css";
// Set license
jspreadsheet.setLicense('N2RiNGFhMmIzZmM5ZTlhZTY2ZDU3YTMzMjFmNDQ2MGM4ZmU2ZGZmNzIxMDg5ZDg5YTc0OWI5ZGIyODIwMjhjNDFkM2UyZjRjYjQ5ZjFlYjMyYTRiNGM1MDBiZTMyMGI1YzNiMDc2ZmNiZTRhNWNmZDM0NDE4NTUwZjJmNWZlZWMsZXlKamJHbGxiblJKWkNJNklpSXNJbTVoYldVaU9pSktjM0J5WldGa2MyaGxaWFFpTENKa1lYUmxJam94TnpVM01ETXhNRFF3TENKa2IyMWhhVzRpT2xzaWFuTndjbVZoWkhOb1pXVjBMbU52YlNJc0ltTnZaR1Z6WVc1a1ltOTRMbWx2SWl3aWFuTm9aV3hzTG01bGRDSXNJbU56WWk1aGNIQWlMQ0p6ZEdGamEySnNhWFI2TG1sdklpd2lkMlZpWTI5dWRHRnBibVZ5TG1sdklpd2lkMlZpSWl3aWJHOWpZV3hvYjNOMElsMHNJbkJzWVc0aU9pSXpOQ0lzSW5OamIzQmxJanBiSW5ZM0lpd2lkamdpTENKMk9TSXNJbll4TUNJc0luWXhNU0lzSW1Ob1lYSjBjeUlzSW1admNtMXpJaXdpWm05eWJYVnNZU0lzSW5CaGNuTmxjaUlzSW5KbGJtUmxjaUlzSW1OdmJXMWxiblJ6SWl3aWFXMXdiM0owWlhJaUxDSmlZWElpTENKMllXeHBaR0YwYVc5dWN5SXNJbk5sWVhKamFDSXNJbkJ5YVc1MElpd2ljMmhsWlhSeklpd2lZMnhwWlc1MElpd2ljMlZ5ZG1WeUlpd2ljMmhoY0dWeklpd2labTl5YldGMElsMHNJbVJsYlc4aU9uUnlkV1Y5');
// Set the extensions
jspreadsheet.setExtensions({ formula });
export default function App() {
// Spreadsheet array of worksheets
const spreadsheet = useRef();
// Worksheet data
const data = [
[
"System Information",
"Value"
],
[
"Directory",
"=INFO(\"directory\")"
],
[
"OS Version",
"=INFO(\"osversion\")"
],
[
"Excel Release",
"=INFO(\"release\")"
]
];
// Render component
return (
<Spreadsheet ref={spreadsheet}>
<Worksheet data={data} />
</Spreadsheet>
);
}
<template>
<Spreadsheet ref="spreadsheet">
<Worksheet :data="data" />
</Spreadsheet>
</template>
<script>
import { Spreadsheet, Worksheet, jspreadsheet } from "@jspreadsheet/vue";
import "jsuites/dist/jsuites.css";
import "jspreadsheet/dist/jspreadsheet.css";
import formula from "@jspreadsheet/formula-pro";
// Set license
jspreadsheet.setLicense('N2RiNGFhMmIzZmM5ZTlhZTY2ZDU3YTMzMjFmNDQ2MGM4ZmU2ZGZmNzIxMDg5ZDg5YTc0OWI5ZGIyODIwMjhjNDFkM2UyZjRjYjQ5ZjFlYjMyYTRiNGM1MDBiZTMyMGI1YzNiMDc2ZmNiZTRhNWNmZDM0NDE4NTUwZjJmNWZlZWMsZXlKamJHbGxiblJKWkNJNklpSXNJbTVoYldVaU9pSktjM0J5WldGa2MyaGxaWFFpTENKa1lYUmxJam94TnpVM01ETXhNRFF3TENKa2IyMWhhVzRpT2xzaWFuTndjbVZoWkhOb1pXVjBMbU52YlNJc0ltTnZaR1Z6WVc1a1ltOTRMbWx2SWl3aWFuTm9aV3hzTG01bGRDSXNJbU56WWk1aGNIQWlMQ0p6ZEdGamEySnNhWFI2TG1sdklpd2lkMlZpWTI5dWRHRnBibVZ5TG1sdklpd2lkMlZpSWl3aWJHOWpZV3hvYjNOMElsMHNJbkJzWVc0aU9pSXpOQ0lzSW5OamIzQmxJanBiSW5ZM0lpd2lkamdpTENKMk9TSXNJbll4TUNJc0luWXhNU0lzSW1Ob1lYSjBjeUlzSW1admNtMXpJaXdpWm05eWJYVnNZU0lzSW5CaGNuTmxjaUlzSW5KbGJtUmxjaUlzSW1OdmJXMWxiblJ6SWl3aWFXMXdiM0owWlhJaUxDSmlZWElpTENKMllXeHBaR0YwYVc5dWN5SXNJbk5sWVhKamFDSXNJbkJ5YVc1MElpd2ljMmhsWlhSeklpd2lZMnhwWlc1MElpd2ljMlZ5ZG1WeUlpd2ljMmhoY0dWeklpd2labTl5YldGMElsMHNJbVJsYlc4aU9uUnlkV1Y5');
// Set the extensions
jspreadsheet.setExtensions({ formula });
export default {
components: {
Spreadsheet,
Worksheet,
},
data() {
// Worksheet data
const data = [
[
"System Information",
"Value"
],
[
"Directory",
"=INFO(\"directory\")"
],
[
"OS Version",
"=INFO(\"osversion\")"
],
[
"Excel Release",
"=INFO(\"release\")"
]
]
return {
data
};
}
}
</script>
import { Component, ViewChild, ElementRef } from "@angular/core";
import jspreadsheet from "jspreadsheet";
import * as formula from "@jspreadsheet/formula-pro";
// Set your JSS license key (The following key only works for one day)
jspreadsheet.setLicense('N2RiNGFhMmIzZmM5ZTlhZTY2ZDU3YTMzMjFmNDQ2MGM4ZmU2ZGZmNzIxMDg5ZDg5YTc0OWI5ZGIyODIwMjhjNDFkM2UyZjRjYjQ5ZjFlYjMyYTRiNGM1MDBiZTMyMGI1YzNiMDc2ZmNiZTRhNWNmZDM0NDE4NTUwZjJmNWZlZWMsZXlKamJHbGxiblJKWkNJNklpSXNJbTVoYldVaU9pSktjM0J5WldGa2MyaGxaWFFpTENKa1lYUmxJam94TnpVM01ETXhNRFF3TENKa2IyMWhhVzRpT2xzaWFuTndjbVZoWkhOb1pXVjBMbU52YlNJc0ltTnZaR1Z6WVc1a1ltOTRMbWx2SWl3aWFuTm9aV3hzTG01bGRDSXNJbU56WWk1aGNIQWlMQ0p6ZEdGamEySnNhWFI2TG1sdklpd2lkMlZpWTI5dWRHRnBibVZ5TG1sdklpd2lkMlZpSWl3aWJHOWpZV3hvYjNOMElsMHNJbkJzWVc0aU9pSXpOQ0lzSW5OamIzQmxJanBiSW5ZM0lpd2lkamdpTENKMk9TSXNJbll4TUNJc0luWXhNU0lzSW1Ob1lYSjBjeUlzSW1admNtMXpJaXdpWm05eWJYVnNZU0lzSW5CaGNuTmxjaUlzSW5KbGJtUmxjaUlzSW1OdmJXMWxiblJ6SWl3aWFXMXdiM0owWlhJaUxDSmlZWElpTENKMllXeHBaR0YwYVc5dWN5SXNJbk5sWVhKamFDSXNJbkJ5YVc1MElpd2ljMmhsWlhSeklpd2lZMnhwWlc1MElpd2ljMlZ5ZG1WeUlpd2ljMmhoY0dWeklpd2labTl5YldGMElsMHNJbVJsYlc4aU9uUnlkV1Y5');
// Set the extensions
jspreadsheet.setExtensions({ formula });
@Component({
standalone: true,
selector: "app-root",
template: `<div #spreadsheet></div>`
})
export class AppComponent {
@ViewChild("spreadsheet") spreadsheet: ElementRef;
// Worksheets
worksheets: jspreadsheet.worksheetInstance[];
// Create a new data grid
ngAfterViewInit() {
// Create spreadsheet
this.worksheets = jspreadsheet(this.spreadsheet.nativeElement, {
worksheets: [{
data: [
[
"System Information",
"Value"
],
[
"Directory",
"=INFO(\"directory\")"
],
[
"OS Version",
"=INFO(\"osversion\")"
],
[
"Excel Release",
"=INFO(\"release\")"
]
]
}]
});
}
}