pub fn write_csv(
file_path: &str,
headers: &[&str],
rows: &[Vec<String>],
) -> Result<()>Expand description
Write data to CSV file
§Arguments
file_path- Output file pathheaders- CSV column headersrows- Data rows
§Examples
use celers_cli::command_utils::write_csv;
let headers = vec!["Name", "Count"];
let rows = vec![
vec!["Tasks".to_string(), "100".to_string()],
vec!["Workers".to_string(), "5".to_string()],
];
write_csv("report.csv", &headers, &rows)?;