sábado, 18 de enero de 2025

Autocad - Script doesn't draw properly

 https://help.autodesk.com/view/ACD/2025/ENU/?guid=GUID-94994960-5E62-4044-BEF7-9CF91667F641

Solved



Then lines on notes are drawn properly




lunes, 18 de noviembre de 2024

Google Sheets - script to list all formulas in selected range of current sheet

 function getFormulasFromSelectedRange() {

  var sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
  var range = sheet.getActiveRange(); // Gets the currently selected range
  var formulas = range.getFormulas(); // Retrieves the formulas in the selected range
  var output = [];
 
  for (var i = 0; i < formulas.length; i++) {
    for (var j = 0; j < formulas[i].length; j++) {
      if (formulas[i][j]) { // Only add if there's a formula
        output.push(
          "Cell " + range.getCell(i + 1, j + 1).getA1Notation() + ": " + formulas[i][j]
        );
      }
    }
  }
 
  Logger.log(output.join("\n")); // Logs all formulas and their locations
}

martes, 10 de septiembre de 2024

JSON into EXCEL

Explica com convertir un JSON en XLSX

https://youtu.be/T_Jp2X9owQk 

volem analitzar amb EXCEL els projectes del CDTI, accessibles des de l'enllaç:

https://www.cdti.es/datos-abiertos-creditos-subvenciones-y-lineas


Amb el Python

import pandas as pd
import json

# Path to your JSON file
json_file_path = r'C:\Users\1664\proyectos_CDTI\proyectos_CDTI.json'

# Path to save the CSV file
csv_file_path = r'
C:\Users\1664\proyectos_CDTI\proyectos_CDTI.csv'

# Load JSON data
with open(json_file_path, 'r', encoding='utf-8') as f:
    data = json.load(f)

# Convert JSON to DataFrame
df = pd.DataFrame(data)

# Save DataFrame to CSV
df.to_csv(csv_file_path, index=False, encoding='utf-8')

print(f"CSV file saved to {csv_file_path}")