Analyze Chex Report
Want to know your Chex numbers but don't want to manually parse through your Chex report?
Retrieve your Chex report PDF from Chex. Upload that PDF below. This tool will provide you with a CSV of your Chex inquiries and a report of your inquiries by month.
This site is run on the serverless platform Github Pages. I don't see your Chex report. You can see exactly what is happening in the JS code that runs in the browser below:
// Automatically trigger the extraction when a new file is uploaded
document.getElementById('pdfInput').addEventListener('change', processPDF);
async function processPDF() {
const fileInput = document.getElementById('pdfInput');
if (!fileInput.files.length) {
alert('Please select a PDF file.');
return;
}
const file = fileInput.files[0];
const arrayBuffer = await file.arrayBuffer();
// Configure the workerSrc property
pdfjsLib.GlobalWorkerOptions.workerSrc = 'https://cdnjs.cloudflare.com/ajax/libs/pdf.js/3.3.122/pdf.worker.min.js';
const pdf = await pdfjsLib.getDocument({ data: arrayBuffer }).promise;
let fullText = '';
// Extract text from each page
for (let i = 0; i < pdf.numPages; i++) {
const page = await pdf.getPage(i + 1);
const textContent = await page.getTextContent();
const pageText = textContent.items.map(item => item.str).join(' ');
fullText += pageText + '\n';
}
// Extract the "Inquiries Viewed By Others" section
const sectionPattern = /Inquiries Viewed By Others([\s\S]*?)Inquiries Viewed Only By You/;
const sectionMatch = fullText.match(sectionPattern);
if (!sectionMatch) {
alert("Could not find the 'Inquiries Viewed By Others' section.");
return;
}
const inquiriesSection = sectionMatch[1];
const inquiryPattern = /Inquirer:\s*(.*?);(.*?)Phone Number:\s*(.*?)(?:Inquiry Date:\s*(\d{2}\/\d{2}\/\d{4}))/g;
const inquiries = [];
let match;
while ((match = inquiryPattern.exec(inquiriesSection)) !== null) {
inquiries.push({
bank_name: match[1].trim(),
bank_address: match[2].trim(),
bank_phone: match[3].trim(),
inquiry_date: match[4].trim()
});
}
if (inquiries.length === 0) {
alert('No inquiries found.');
return;
}
// Generate CSV content
const csvContent = 'bank_name,bank_address,bank_phone,inquiry_date\n' +
inquiries.map(inquiry =>
`"${inquiry.bank_name}","${inquiry.bank_address}","${inquiry.bank_phone}","${inquiry.inquiry_date}"`).join('\n');
// Create a download link for the CSV
const blob = new Blob([csvContent], { type: 'text/csv' });
const downloadLink = document.getElementById('downloadLink');
downloadLink.href = URL.createObjectURL(blob);
downloadLink.download = 'inquiries_viewed_by_others.csv';
downloadLink.style.display = 'block';
downloadLink.textContent = 'Download CSV';
// Generate the summary
generateSummary(inquiries);
}
function generateSummary(inquiries) {
const now = new Date();
const oneMonthAgo = new Date(now);
oneMonthAgo.setMonth(now.getMonth() - 1);
const twoMonthsAgo = new Date(now);
twoMonthsAgo.setMonth(now.getMonth() - 2);
const threeMonthsAgo = new Date(now);
threeMonthsAgo.setMonth(now.getMonth() - 3);
const sixMonthsAgo = new Date(now);
sixMonthsAgo.setMonth(now.getMonth() - 6);
const twelveMonthsAgo = new Date(now);
twelveMonthsAgo.setMonth(now.getMonth() - 12);
const twentyFourMonthsAgo = new Date(now);
twentyFourMonthsAgo.setMonth(now.getMonth() - 24);
let last1Month = 0;
let last2Months = 0;
let last3Months = 0;
let last6Months = 0;
let last12Months = 0;
let last24Months = 0;
inquiries.forEach(inquiry => {
const inquiryDate = new Date(inquiry.inquiry_date);
if (inquiryDate >= oneMonthAgo) {
last1Month++;
}
if (inquiryDate >= twoMonthsAgo) {
last2Months++;
}
if (inquiryDate >= threeMonthsAgo) {
last3Months++;
}
if (inquiryDate >= sixMonthsAgo) {
last6Months++;
}
if (inquiryDate >= twelveMonthsAgo) {
last12Months++;
}
if (inquiryDate >= twentyFourMonthsAgo) {
last24Months++;
}
});
<!-- Display the summary -->
const summaryDiv = document.getElementById('summary');
summaryDiv.innerHTML = `
<h3>Summary</h3>
<ul>
<li>Inquiries in the last 1 month: ${last1Month}</li>
<li>Inquiries in the last 2 months: ${last2Months}</li>
<li>Inquiries in the last 3 months: ${last3Months}</li>
<li>Inquiries in the last 6 months: ${last6Months}</li>
<li>Inquiries in the last 12 months: ${last12Months}</li>
<li>Inquiries in the last 24 months: ${last24Months}</li>
</ul>
<button class="copy-button" onclick="copySummary(${last1Month}, ${last2Months}, ${last3Months}, ${last6Months}, ${last12Months}, ${last24Months})">Copy Summary</button>
`;
}
function copySummary(last1Month, last2Months, last3Months, last6Months, last12Months, last24Months) {
const summaryText = \`${last1Month}/1, ${last2Months}/2, ${last3Months}/3, ${last6Months}/6, ${last12Months}/12, ${last24Months}/24\`;
navigator.clipboard.writeText(summaryText).then(() => {
alert("Summary copied to clipboard: " + summaryText);
}, () => {
alert("Failed to copy summary.");
});
}